diff --git a/src/draw/sw/blend/lv_draw_sw_blend.c b/src/draw/sw/blend/lv_draw_sw_blend.c index ffdcfec6a..0264dc969 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend.c +++ b/src/draw/sw/blend/lv_draw_sw_blend.c @@ -22,7 +22,7 @@ #if LV_DRAW_SW_SUPPORT_ARGB8888 #include "lv_draw_sw_blend_to_argb8888.h" #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 #include "lv_draw_sw_blend_to_rgb888.h" #endif #if LV_DRAW_SW_SUPPORT_I1 diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_al88.c b/src/draw/sw/blend/lv_draw_sw_blend_to_al88.c index a87e07fc6..4110fe8a2 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_al88.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_al88.c @@ -62,7 +62,7 @@ static void /* LV_ATTRIBUTE_FAST_MEM */ al88_image_blend(lv_draw_sw_blend_image_ static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(lv_draw_sw_blend_image_dsc_t * dsc); #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); #endif @@ -719,7 +719,7 @@ static void LV_ATTRIBUTE_FAST_MEM rgb565_image_blend(lv_draw_sw_blend_image_dsc_ #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c b/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c index 47b8c1577..fc063b277 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c @@ -64,7 +64,7 @@ typedef struct { static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(lv_draw_sw_blend_image_dsc_t * dsc); #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); #endif @@ -739,7 +739,7 @@ static void LV_ATTRIBUTE_FAST_MEM rgb565_image_blend(lv_draw_sw_blend_image_dsc_ #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) { diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c b/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c index 1e056ee66..1fd19c3e7 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c @@ -50,7 +50,7 @@ static void /* LV_ATTRIBUTE_FAST_MEM */ i1_image_blend(lv_draw_sw_blend_image_ds static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(lv_draw_sw_blend_image_dsc_t * dsc); #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); #endif @@ -810,7 +810,7 @@ static void LV_ATTRIBUTE_FAST_MEM argb8888_image_blend(lv_draw_sw_blend_image_ds } #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) { diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c b/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c index c1177f3e9..5c080f502 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c @@ -54,7 +54,7 @@ static void /* LV_ATTRIBUTE_FAST_MEM */ l8_image_blend(lv_draw_sw_blend_image_ds static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(lv_draw_sw_blend_image_dsc_t * dsc); #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); #endif @@ -668,7 +668,7 @@ static void LV_ATTRIBUTE_FAST_MEM rgb565_image_blend(lv_draw_sw_blend_image_dsc_ #endif -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c index 98899f3fe..a05bf2337 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c @@ -54,7 +54,7 @@ static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(lv_draw_sw_blend_image_dsc_t * dsc); -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); #endif @@ -862,7 +862,7 @@ static void LV_ATTRIBUTE_FAST_MEM rgb565_image_blend(lv_draw_sw_blend_image_dsc_ } } -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) { diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c index 1349b155d..b5065eb28 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c @@ -9,7 +9,7 @@ #include "lv_draw_sw_blend_to_rgb888.h" #if LV_USE_DRAW_SW -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 #include "lv_draw_sw_blend_private.h" #include "../../../misc/lv_math.h" @@ -980,6 +980,6 @@ static inline void * LV_ATTRIBUTE_FAST_MEM drawbuf_next_row(const void * buf, ui return (void *)((uint8_t *)buf + stride); } -#endif +#endif /*LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888*/ -#endif +#endif /*LV_USE_DRAW_SW*/ diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c index 3dfc4f31b..d94e88f6a 100644 --- a/src/draw/sw/lv_draw_sw_transform.c +++ b/src/draw/sw/lv_draw_sw_transform.c @@ -51,7 +51,7 @@ typedef struct { static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout, int32_t * yout); -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void transform_rgb888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size); @@ -76,14 +76,17 @@ static void transform_a8(const uint8_t * src, int32_t src_w, int32_t src_h, int3 #endif #if LV_DRAW_SW_SUPPORT_L8 +#if LV_DRAW_SW_SUPPORT_AL88 static void transform_l8_to_al88(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * abuf, bool aa); - +#endif +#if LV_DRAW_SW_SUPPORT_ARGB8888 static void transform_l8_to_argb8888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * abuf, bool aa); #endif +#endif /*LV_DRAW_SW_SUPPORT_L8*/ /********************** * STATIC VARIABLES @@ -268,8 +271,15 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are alpha_buf, true, aa); break; #endif -#if LV_DRAW_SW_SUPPORT_L8 + +#if LV_DRAW_SW_SUPPORT_L8 && (LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_AL88) case LV_COLOR_FORMAT_L8: +#if LV_DRAW_SW_SUPPORT_ARGB8888 && !LV_DRAW_SW_SUPPORT_AL88 + transform_l8_to_argb8888(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, + aa); +#elif LV_DRAW_SW_SUPPORT_AL88 && !LV_DRAW_SW_SUPPORT_ARGB8888 + transform_l8_to_al88(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa); +#else if(draw_dsc->recolor_opa >= LV_OPA_MIN) transform_l8_to_argb8888(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa); @@ -277,6 +287,7 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are transform_l8_to_al88(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa); break; #endif +#endif /*LV_DRAW_SW_SUPPORT_L8 && (LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_AL88)*/ default: break; } @@ -290,7 +301,7 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are * STATIC FUNCTIONS **********************/ -#if LV_DRAW_SW_SUPPORT_RGB888 +#if LV_DRAW_SW_SUPPORT_RGB888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void transform_rgb888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, @@ -757,7 +768,7 @@ static void transform_l8_to_al88(const uint8_t * src, int32_t src_w, int32_t src } } -#endif +#endif /*LV_DRAW_SW_SUPPORT_AL88*/ #if LV_DRAW_SW_SUPPORT_ARGB8888 @@ -837,9 +848,9 @@ static void transform_l8_to_argb8888(const uint8_t * src, int32_t src_w, int32_t } } -#endif +#endif /*LV_DRAW_SW_SUPPORT_ARGB8888*/ -#endif +#endif /*LV_DRAW_SW_SUPPORT_L8*/ static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout, int32_t * yout) diff --git a/src/draw/sw/lv_draw_sw_utils.c b/src/draw/sw/lv_draw_sw_utils.c index 8e88a1fb5..9933f178a 100644 --- a/src/draw/sw/lv_draw_sw_utils.c +++ b/src/draw/sw/lv_draw_sw_utils.c @@ -72,7 +72,7 @@ * STATIC PROTOTYPES **********************/ -#if LV_DRAW_SW_SUPPORT_ARGB8888 +#if LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void rotate90_argb8888(const uint32_t * src, uint32_t * dst, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dst_stride); @@ -318,7 +318,7 @@ void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t * STATIC FUNCTIONS **********************/ -#if LV_DRAW_SW_SUPPORT_ARGB8888 +#if LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_XRGB8888 static void rotate270_argb8888(const uint32_t * src, uint32_t * dst, int32_t src_width, int32_t src_height, int32_t src_stride,