fix(vg_lite): enable box shadow by default (#8242)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
VIFEX
2025-05-16 11:05:32 +08:00
committed by GitHub
parent aa86d762c0
commit 94bdc2daa4
25 changed files with 21 additions and 16 deletions
+1 -1
View File
@@ -471,7 +471,7 @@ menu "LVGL configuration"
config LV_VG_LITE_USE_BOX_SHADOW
bool "Enable border to simulate shadow"
default n
default y
depends on LV_USE_DRAW_VG_LITE
help
which usually improves performance,
+1 -1
View File
@@ -285,7 +285,7 @@
/** 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
#define LV_VG_LITE_USE_BOX_SHADOW 1
/** VG-Lite gradient maximum cache number.
* @note The memory usage of a single gradient image is 4K bytes. */
+1 -1
View File
@@ -328,7 +328,7 @@
/** 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
#define LV_VG_LITE_USE_BOX_SHADOW 1
/** VG-Lite gradient maximum cache number.
* @note The memory usage of a single gradient image is 4K bytes. */
+11 -10
View File
@@ -77,17 +77,18 @@ void lv_draw_vg_lite_box_shadow(lv_draw_task_t * t, const lv_draw_box_shadow_dsc
border_dsc.radius++;
lv_area_increase(&draw_area, 1, 1);
lv_draw_vg_lite_border(t, &border_dsc, &draw_area);
/* fill center */
if(dsc->ofs_x || dsc->ofs_y) {
lv_draw_fill_dsc_t fill_dsc;
lv_draw_fill_dsc_init(&fill_dsc);
fill_dsc.radius = dsc->radius;
fill_dsc.opa = dsc->opa;
fill_dsc.color = dsc->color;
lv_draw_vg_lite_fill(t, &fill_dsc, &core_area);
}
}
/* fill center */
if(dsc->ofs_x || dsc->ofs_y) {
lv_draw_fill_dsc_t fill_dsc;
lv_draw_fill_dsc_init(&fill_dsc);
fill_dsc.radius = dsc->radius;
fill_dsc.opa = dsc->opa;
fill_dsc.color = dsc->color;
lv_draw_vg_lite_fill(t, &fill_dsc, &core_area);
}
LV_PROFILER_DRAW_END;
}
+7 -3
View File
@@ -910,10 +910,14 @@
* 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
#ifdef LV_KCONFIG_PRESENT
#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
#else
#define LV_VG_LITE_USE_BOX_SHADOW 0
#define LV_VG_LITE_USE_BOX_SHADOW 1
#endif
#endif
Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB