refactor(conf): rename LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE to LV_DRAW_LAYER_SIMPLE_BUF_SIZE (#5798)

This commit is contained in:
Gabor Kiss-Vamosi
2024-03-18 03:26:23 +01:00
committed by GitHub
parent 7182aa2560
commit ad1bfa6412
5 changed files with 40 additions and 36 deletions

18
Kconfig
View File

@@ -174,6 +174,15 @@ menu "LVGL configuration"
help
Align the start address of draw_buf addresses to this bytes.
config LV_DRAW_LAYER_SIMPLE_BUF_SIZE
int "Optimal size to buffer the widget with opacity"
default 24576
depends on LV_USE_DRAW_SW
help
If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
"Transformed layers" (if `transform_angle/zoom` are set) use larger buffers and can't be drawn in chunks.
config LV_USE_DRAW_SW
bool "Enable software rendering"
default y
@@ -202,15 +211,6 @@ menu "LVGL configuration"
help
Disabling this allows arm2d to work on its own (for testing only)
config LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE
int "Optimal size to buffer the widget with opacity"
default 24576
depends on LV_USE_DRAW_SW
help
If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
"Transformed layers" (if `transform_angle/zoom` are set) use larger buffers and can't be drawn in chunks.
config LV_DRAW_SW_COMPLEX
bool "Enable complex draw engine"
default y

View File

@@ -99,6 +99,14 @@
/*Align the start address of draw_buf addresses to this bytes*/
#define LV_DRAW_BUF_ALIGN 4
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#define LV_USE_DRAW_SW 1
#if LV_USE_DRAW_SW == 1
/* Set the number of draw unit.
@@ -112,14 +120,6 @@
/* Enable native helium assembly to be compiled */
#define LV_USE_NATIVE_HELIUM_ASM 1
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
#define LV_DRAW_SW_COMPLEX 1

View File

@@ -906,8 +906,8 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
if(layer_type == LV_LAYER_TYPE_SIMPLE) {
int32_t w = lv_area_get_width(&layer_area_full);
uint8_t px_size = lv_color_format_get_size(disp_refr->color_format);
max_rgb_row_height = LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE / w / px_size;
max_argb_row_height = LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE / w / sizeof(lv_color32_t);
max_rgb_row_height = LV_DRAW_LAYER_SIMPLE_BUF_SIZE / w / px_size;
max_argb_row_height = LV_DRAW_LAYER_SIMPLE_BUF_SIZE / w / sizeof(lv_color32_t);
}
lv_area_t layer_area_act;

View File

@@ -33,6 +33,10 @@ extern "C" {
#define lv_image_set_align lv_image_set_inner_align
#define lv_image_get_align lv_image_get_inner_align
#ifndef LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE
#endif
/**********************
* MACROS
**********************/

View File

@@ -249,6 +249,20 @@
#endif
#endif
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#ifndef LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#ifdef CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#else
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#endif
#endif
#ifndef LV_USE_DRAW_SW
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DRAW_SW
@@ -298,20 +312,6 @@
#endif
#endif
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#ifndef LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE
#ifdef CONFIG_LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE CONFIG_LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE
#else
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#endif
#endif
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
#ifndef LV_DRAW_SW_COMPLEX