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

perf(draw): use the simpler layer clear method (#5470)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech 2024-01-25 16:42:50 +08:00 committed by GitHub
parent e3b747f044
commit b81fa5a354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -379,12 +379,7 @@ void * lv_draw_layer_alloc_buf(lv_layer_t * layer)
}
if(lv_color_format_has_alpha(layer->color_format)) {
lv_area_t a;
a.x1 = 0;
a.y1 = 0;
a.x2 = w - 1;
a.y2 = h - 1;
lv_draw_buf_clear(layer->draw_buf, &a);
lv_draw_buf_clear(layer->draw_buf, NULL);
}
return layer->draw_buf->data;