mirror of
https://github.com/lvgl/lvgl.git
synced 2026-09-22 11:16:21 +08:00
fix(vg_lite):check the color format before alloc layer buffer (#6071)
Signed-off-by: bailinjiang <915290475@qq.com>
This commit is contained in:
@@ -173,13 +173,13 @@ static int32_t draw_dispatch(lv_draw_unit_t * draw_unit, lv_layer_t * layer)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void * buf = lv_draw_layer_alloc_buf(layer);
|
||||
if(!buf) {
|
||||
/* Return if target buffer format is not supported. */
|
||||
if(!lv_vg_lite_is_dest_cf_supported(layer->color_format)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Return if target buffer format is not supported. */
|
||||
if(!lv_vg_lite_is_dest_cf_supported(layer->draw_buf->header.cf)) {
|
||||
void * buf = lv_draw_layer_alloc_buf(layer);
|
||||
if(!buf) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user