fix(vg_lite): fix drawing A8 label error (#5199)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech
2024-01-05 21:21:43 +08:00
committed by GitHub
parent 5e4342bdf7
commit 0b54a69c36
2 changed files with 12 additions and 1 deletions
+6
View File
@@ -198,6 +198,12 @@ static void draw_letter_bitmap(lv_draw_vg_lite_unit_t * u, const lv_draw_glyph_d
lv_vg_lite_path_drop(u, path);
}
/* TODO: The temporary buffer of the built-in font is reused.
* You need to wait for the GPU to finish using the buffer before releasing it.
* Later, use the font cache for management to improve efficiency.
*/
LV_VG_LITE_CHECK_ERROR(vg_lite_finish());
}
#if SUPPORT_OUTLINE_FONT
+6 -1
View File
@@ -541,7 +541,7 @@ void lv_vg_lite_buffer_from_draw_buf(vg_lite_buffer_t * buffer, const lv_draw_bu
LV_ASSERT_NULL(buffer);
LV_ASSERT_NULL(draw_buf);
const void * ptr = draw_buf->data;
const uint8_t * ptr = draw_buf->data;
int32_t width = draw_buf->header.w;
int32_t height = draw_buf->header.h;
vg_lite_buffer_format_t format = lv_vg_lite_vg_fmt(draw_buf->header.cf);
@@ -552,6 +552,11 @@ void lv_vg_lite_buffer_from_draw_buf(vg_lite_buffer_t * buffer, const lv_draw_bu
width = lv_vg_lite_width_align(width);
lv_vg_lite_buffer_init(buffer, ptr, width, height, format, false);
/* Alpha image need to be multiplied by color */
if(LV_COLOR_FORMAT_IS_ALPHA_ONLY(draw_buf->header.cf)) {
buffer->image_mode = VG_LITE_MULTIPLY_IMAGE_MODE;
}
}
void lv_vg_lite_image_matrix(vg_lite_matrix_t * matrix, int32_t x, int32_t y, const lv_draw_image_dsc_t * dsc)