fix(vg_lite): enable box shadow by default (#8242)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
@@ -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,
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |