1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

perf(draw): skip border drawing when border side is none (#5959)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
VIFEX 2024-03-29 02:37:48 +08:00 committed by GitHub
parent 30d1a5cf9b
commit 4cce3b5cd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,10 @@ void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_a
if(dsc->bg_image_opa <= LV_OPA_MIN || dsc->bg_image_src == NULL) has_bg_img = false;
else has_bg_img = true;
if(dsc->border_opa <= LV_OPA_MIN || dsc->border_width == 0 || dsc->border_post == true) has_border = false;
if(dsc->border_opa <= LV_OPA_MIN
|| dsc->border_width == 0
|| dsc->border_post == true
|| dsc->border_side == LV_BORDER_SIDE_NONE) has_border = false;
else has_border = true;
if(dsc->outline_opa <= LV_OPA_MIN || dsc->outline_width == 0) has_outline = false;