fix(draw_img): pass correct variable to LV_DRAW_SW_IMAGE (#8314)

This commit is contained in:
André Costa
2025-05-28 09:22:20 +02:00
committed by GitHub
parent e6ad1ce23a
commit 37f73364b4
2 changed files with 12 additions and 12 deletions
+11 -11
View File
@@ -48,7 +48,7 @@ extern "C" {
__img_coords, \
__src_stride, \
__blend_area, \
__draw_unit, \
__draw_task, \
__draw_dsc) \
lv_draw_sw_image_helium( (__transformed), \
(__cf), \
@@ -56,7 +56,7 @@ extern "C" {
(__img_coords), \
(__src_stride), \
(__blend_area), \
(__draw_unit), \
(__draw_task), \
(__draw_dsc))
#endif
@@ -175,11 +175,11 @@ static inline lv_result_t lv_draw_sw_image_helium(
const lv_area_t * coords,
int32_t src_stride,
const lv_area_t * des_area,
lv_draw_unit_t * draw_unit,
lv_draw_task_t * draw_task,
const lv_draw_image_dsc_t * draw_dsc)
{
lv_result_t result = LV_RESULT_INVALID;
lv_layer_t * layer = draw_unit->target_layer;
lv_layer_t * layer = draw_task->target_layer;
lv_color_format_t des_cf = layer->color_format;
static bool arm_2d_initialized = false;
@@ -218,7 +218,7 @@ static inline lv_result_t lv_draw_sw_image_helium(
/* ------------- prepare parameters for arm-2d APIs - BEGIN --------- */
lv_area_t blend_area;
if(!lv_area_intersect(&blend_area, des_area, draw_unit->clip_area)) {
if(!lv_area_intersect(&blend_area, des_area, draw_task->clip_area)) {
break;
}
@@ -268,8 +268,8 @@ static inline lv_result_t lv_draw_sw_image_helium(
target_region = (arm_2d_region_t) {
.tLocation = {
.iX = (int16_t)(coords->x1 - draw_unit->clip_area->x1),
.iY = (int16_t)(coords->y1 - draw_unit->clip_area->y1),
.iX = (int16_t)(coords->x1 - draw_task->clip_area->x1),
.iY = (int16_t)(coords->y1 - draw_task->clip_area->y1),
},
.tSize = src_size,
};
@@ -289,12 +289,12 @@ static inline lv_result_t lv_draw_sw_image_helium(
clip_region = (arm_2d_region_t) {
.tLocation = {
.iX = (int16_t)(draw_unit->clip_area->x1 - layer->buf_area.x1),
.iY = (int16_t)(draw_unit->clip_area->y1 - layer->buf_area.y1),
.iX = (int16_t)(draw_task->clip_area->x1 - layer->buf_area.x1),
.iY = (int16_t)(draw_task->clip_area->y1 - layer->buf_area.y1),
},
.tSize = {
.iWidth = (int16_t)lv_area_get_width(draw_unit->clip_area),
.iHeight = (int16_t)lv_area_get_height(draw_unit->clip_area),
.iWidth = (int16_t)lv_area_get_width(draw_task->clip_area),
.iHeight = (int16_t)lv_area_get_height(draw_task->clip_area),
},
};
+1 -1
View File
@@ -298,7 +298,7 @@ static void img_draw_core(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_d
img_coords, /* src_h, src_w, src_x1, src_y1 */
img_stride, /* image stride */
clipped_img_area, /* blend area */
draw_unit, /* target buffer, buffer width, buffer height, buffer stride */
t, /* draw task*/
draw_dsc)) { /* opa, recolour_opa and colour */
/*In the other cases every pixel need to be checked one-by-one*/
transform_and_recolor(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area);