From c94216ab4779c7c1eae7c717f3c8b2185492d577 Mon Sep 17 00:00:00 2001 From: Finomnis Date: Thu, 14 Nov 2024 20:39:51 +0100 Subject: [PATCH] fix(draw): fix incorrect clip area computation when clearing transparent framebuffers (#7269) --- src/core/lv_refr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 66f2fd7fa..33aed28aa 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -770,7 +770,9 @@ static void refr_configured_layer(lv_layer_t * layer) } /*If the screen is transparent initialize it when the flushing is ready*/ if(lv_color_format_has_alpha(disp_refr->color_format)) { - lv_draw_buf_clear(layer->draw_buf, &layer->_clip_area); + lv_area_t clear_area = layer->_clip_area; + lv_area_move(&clear_area, -layer->buf_area.x1, -layer->buf_area.y1); + lv_draw_buf_clear(layer->draw_buf, &clear_area); } lv_obj_t * top_act_scr = NULL;