feat(draw/dave2d): remove todos (#8896)

Signed-off-by: Felipe Neves <felipe@lvgl.io>
This commit is contained in:
Felipe Neves
2025-09-18 07:28:56 -03:00
committed by GitHub
parent 16f6693ca1
commit 095e923e28
5 changed files with 1 additions and 49 deletions
@@ -56,8 +56,6 @@ void lv_draw_dave2d_fill(lv_draw_task_t * t, const lv_draw_fill_dsc_t * dsc, con
y2 = (float)LV_MAX(coordinates.y1, coordinates.y2);
if(a1 < a2) {
/* TODO */
LV_ASSERT(0);
y0 = 0.0f;//silence the compiler warning
y3 = 0.0f;
@@ -74,8 +72,6 @@ void lv_draw_dave2d_fill(lv_draw_task_t * t, const lv_draw_fill_dsc_t * dsc, con
(d2_point)D2_FIX4((y3_i - y0_i)));
}
else if(LV_GRAD_DIR_HOR == dsc->grad.dir) {
/* TODO */
LV_ASSERT(0);
float x1;
float x2;
@@ -92,8 +88,6 @@ void lv_draw_dave2d_fill(lv_draw_task_t * t, const lv_draw_fill_dsc_t * dsc, con
x2 = (float)LV_MAX(coordinates.x1, coordinates.x2);
if(a1 < a2) {
/* TODO */
LV_ASSERT(0);
x0 = 0.0f;//silence the compiler warning
x3 = 0.0f;
@@ -46,11 +46,6 @@ void lv_draw_dave2d_line(lv_draw_task_t * t, const lv_draw_line_dsc_t * dsc)
bool dashed = dsc->dash_gap && dsc->dash_width;
if(dashed) {
/* TODO */
LV_ASSERT(0);
}
//
// Generate render operations
//
@@ -108,8 +108,6 @@ void lv_draw_dave2d_triangle(lv_draw_task_t * t, const lv_draw_triangle_dsc_t *
y2 = LV_MAX3(p[0].y, p[1].y, p[2].y);
if(a1 < a2) {
/* TODO */
LV_ASSERT(0);
y0 = 0.0f;//silence the compiler warning
y3 = 0.0f;
@@ -124,10 +122,7 @@ void lv_draw_dave2d_triangle(lv_draw_task_t * t, const lv_draw_triangle_dsc_t *
d2_setalphagradient(u->d2_handle, 0, D2_FIX4(0), D2_FIX4(y0_i), D2_FIX4(0), D2_FIX4((y3_i - y0_i)));
}
else if(LV_GRAD_DIR_HOR == dsc->grad.dir) {
/* TODO */
LV_ASSERT(0);
}
d2_setcolor(u->d2_handle, 0, lv_draw_dave2d_lv_colour_to_d2_colour(dsc->grad.stops[0].color));
d2_setalphamode(u->d2_handle, d2_am_gradient1);
@@ -64,36 +64,6 @@ d2_color lv_draw_dave2d_lv_colour_to_d2_colour(lv_color_t color)
| (blue) << 0UL;
}
d2_s32 lv_draw_dave2d_cf_fb_get(void)
{
d2_s32 d2_fb_mode = 0;
switch(g_display0_cfg.input->format) {
case DISPLAY_IN_FORMAT_16BITS_RGB565: ///< RGB565, 16 bits
d2_fb_mode = d2_mode_rgb565;
break;
case DISPLAY_IN_FORMAT_32BITS_ARGB8888: ///< ARGB8888, 32 bits
d2_fb_mode = d2_mode_argb8888;
break;
case DISPLAY_IN_FORMAT_32BITS_RGB888: ///< RGB888, 32 bits
d2_fb_mode = d2_mode_argb8888; //GLCDC ignores Alpha when configured for RGB888
break;
case DISPLAY_IN_FORMAT_16BITS_ARGB4444: ///< ARGB4444, 16 bits
d2_fb_mode = d2_mode_argb4444;
break;
case DISPLAY_IN_FORMAT_16BITS_ARGB1555: ///< ARGB1555, 16 bits
case DISPLAY_IN_FORMAT_CLUT8 : ///< CLUT8
case DISPLAY_IN_FORMAT_CLUT4 : ///< CLUT4
case DISPLAY_IN_FORMAT_CLUT1 : ///< CLUT1
//Not supported as a FB format by Dave2D
break;
default:
break;
}
return d2_fb_mode;
}
d2_u32 lv_draw_dave2d_lv_colour_fmt_to_d2_fmt(lv_color_format_t colour_format)
{
d2_u32 d2_lvgl_mode = 0;
@@ -28,8 +28,6 @@ extern "C" {
d2_color lv_draw_dave2d_lv_colour_to_d2_colour(lv_color_t color);
d2_s32 lv_draw_dave2d_cf_fb_get(void);
d2_u32 lv_draw_dave2d_lv_colour_fmt_to_d2_fmt(lv_color_format_t colour_format);
void d2_framebuffer_from_layer(d2_device * handle, lv_layer_t * layer);