From c9872e5283cf6c2a039f1379cf8b638d7673782e Mon Sep 17 00:00:00 2001 From: VIFEX Date: Sat, 4 Jan 2025 21:18:27 +0800 Subject: [PATCH] perf(refr): reduce matrix conversion (#7536) --- src/core/lv_refr.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 252e6c2a0..02fb5767c 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -1103,18 +1103,16 @@ static void refr_obj(lv_layer_t * layer, lv_obj_t * obj) lv_opa_t opa = lv_obj_get_style_opa_layered(obj, 0); if(opa < LV_OPA_MIN) return; -#if LV_DRAW_TRANSFORM_USE_MATRIX - /*If the layer opa is full then use the matrix transform*/ - if(opa >= LV_OPA_MAX && !refr_check_obj_clip_overflow(layer, obj)) { - refr_obj_matrix(layer, obj); - return; - } -#endif /* LV_DRAW_TRANSFORM_USE_MATRIX */ - lv_layer_type_t layer_type = lv_obj_get_layer_type(obj); if(layer_type == LV_LAYER_TYPE_NONE) { lv_obj_redraw(layer, obj); } +#if LV_DRAW_TRANSFORM_USE_MATRIX + /*If the layer opa is full then use the matrix transform*/ + else if(opa >= LV_OPA_MAX && !refr_check_obj_clip_overflow(layer, obj)) { + refr_obj_matrix(layer, obj); + } +#endif /* LV_DRAW_TRANSFORM_USE_MATRIX */ else { lv_area_t layer_area_full; lv_area_t obj_draw_size;