fix(vg_lite): add config to disable draw shadow (#5534)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech
2024-01-31 14:33:57 +08:00
committed by GitHub
parent 0988eddfca
commit e271b23341
4 changed files with 26 additions and 0 deletions

View File

@@ -374,6 +374,14 @@ menu "LVGL configuration"
help help
GPU will try to batch these many draw tasks. GPU will try to batch these many draw tasks.
config LV_VG_LITE_USE_BOX_SHADOW
bool "Enable border to simulate shadow."
default n
depends on LV_USE_DRAW_VG_LITE
help
which usually improves performance,
but does not guarantee the same rendering quality as the software.
config LV_USE_GPU_SDL config LV_USE_GPU_SDL
bool "Use SDL renderer API" bool "Use SDL renderer API"
default n default n

View File

@@ -179,6 +179,11 @@
/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */ /* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
#define LV_VG_LITE_FLUSH_MAX_COUNT 8 #define LV_VG_LITE_FLUSH_MAX_COUNT 8
/* Enable border to simulate shadow
* NOTE: which usually improves performance,
* but does not guarantee the same rendering quality as the software. */
#define LV_VG_LITE_USE_BOX_SHADOW 0
#endif #endif
/*======================= /*=======================

View File

@@ -205,7 +205,9 @@ static int32_t draw_evaluate(lv_draw_unit_t * draw_unit, lv_draw_task_t * task)
case LV_DRAW_TASK_TYPE_LABEL: case LV_DRAW_TASK_TYPE_LABEL:
case LV_DRAW_TASK_TYPE_FILL: case LV_DRAW_TASK_TYPE_FILL:
case LV_DRAW_TASK_TYPE_BORDER: case LV_DRAW_TASK_TYPE_BORDER:
#if LV_VG_LITE_USE_BOX_SHADOW
case LV_DRAW_TASK_TYPE_BOX_SHADOW: case LV_DRAW_TASK_TYPE_BOX_SHADOW:
#endif
case LV_DRAW_TASK_TYPE_LAYER: case LV_DRAW_TASK_TYPE_LAYER:
case LV_DRAW_TASK_TYPE_LINE: case LV_DRAW_TASK_TYPE_LINE:
case LV_DRAW_TASK_TYPE_ARC: case LV_DRAW_TASK_TYPE_ARC:

View File

@@ -471,6 +471,17 @@
#endif #endif
#endif #endif
/* Enable border to simulate shadow
* NOTE: which usually improves performance,
* but does not guarantee the same rendering quality as the software. */
#ifndef LV_VG_LITE_USE_BOX_SHADOW
#ifdef CONFIG_LV_VG_LITE_USE_BOX_SHADOW
#define LV_VG_LITE_USE_BOX_SHADOW CONFIG_LV_VG_LITE_USE_BOX_SHADOW
#else
#define LV_VG_LITE_USE_BOX_SHADOW 0
#endif
#endif
#endif #endif
/*======================= /*=======================