fix(dave2d): handle LV_COLOR_FORMAT_RGB888 correctly (#7594)

This commit is contained in:
jeremy-baker
2025-01-15 04:21:08 +00:00
committed by GitHub
parent 89c4c50c19
commit 7dae232b7f
2 changed files with 2 additions and 4 deletions

View File

@@ -250,7 +250,7 @@ static int32_t _dave2d_evaluate(lv_draw_unit_t * u, lv_draw_task_t * t)
case LV_DRAW_TASK_TYPE_IMAGE: {
lv_draw_image_dsc_t * dsc = t->draw_dsc;
if(dsc->header.cf >= LV_COLOR_FORMAT_PROPRIETARY_START) {
if((dsc->header.cf >= LV_COLOR_FORMAT_PROPRIETARY_START) || (dsc->header.cf == LV_COLOR_FORMAT_RGB888)) {
ret = 0;
break;
}

View File

@@ -117,9 +117,6 @@ d2_u32 lv_draw_dave2d_lv_colour_fmt_to_d2_fmt(lv_color_format_t colour_format)
case(LV_COLOR_FORMAT_RGB565):
d2_lvgl_mode = d2_mode_rgb565;
break;
case(LV_COLOR_FORMAT_RGB888):
d2_lvgl_mode = d2_mode_rgb888;
break;
case(LV_COLOR_FORMAT_ARGB1555):
d2_lvgl_mode = d2_mode_argb1555;
break;
@@ -133,6 +130,7 @@ d2_u32 lv_draw_dave2d_lv_colour_fmt_to_d2_fmt(lv_color_format_t colour_format)
d2_lvgl_mode = d2_mode_argb8888;
break;
case(LV_COLOR_FORMAT_RGB888): //LV_COLOR_FORMAT_RGB888 is a 3 byte format, d2_mode_rgb888 is a 4 byte format, not supported
default:
LV_ASSERT(0);
break;