diff --git a/Kconfig b/Kconfig index 67c273765..6221326e8 100644 --- a/Kconfig +++ b/Kconfig @@ -374,6 +374,14 @@ menu "LVGL configuration" help 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 bool "Use SDL renderer API" default n diff --git a/lv_conf_template.h b/lv_conf_template.h index 249d1aced..d419dab96 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -179,6 +179,11 @@ /* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */ #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 /*======================= diff --git a/src/draw/vg_lite/lv_draw_vg_lite.c b/src/draw/vg_lite/lv_draw_vg_lite.c index 08fea7e85..4d352d1d5 100644 --- a/src/draw/vg_lite/lv_draw_vg_lite.c +++ b/src/draw/vg_lite/lv_draw_vg_lite.c @@ -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_FILL: case LV_DRAW_TASK_TYPE_BORDER: +#if LV_VG_LITE_USE_BOX_SHADOW case LV_DRAW_TASK_TYPE_BOX_SHADOW: +#endif case LV_DRAW_TASK_TYPE_LAYER: case LV_DRAW_TASK_TYPE_LINE: case LV_DRAW_TASK_TYPE_ARC: diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 50bf175e4..e492cd30a 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -471,6 +471,17 @@ #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 /*=======================