mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-23 01:33:59 +08:00
fix(draw_sw): in lv_draw_sw_rotate enable ARGB8888 functions for XRGB8888 too (#7185)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com> Co-authored-by: liamHowatt <liamjmh0@gmail.com>
This commit is contained in:
parent
7cfe085f46
commit
5a609275f4
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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*/
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user