fix(vglite) set cache invalidation callback for all handlers
This is necessary after the changes in c37ad55160
feat(draw_buf): make draw buf API more OOP style
which indirectly changes the font drawing handlers from default_handlers to
font_draw_buf_handlers
Because the cache invalidation in vglite was enabled only for
default handlers this resulted in broken font rendering when vglite draw
unit was used.
Signed-off-by: Cristian Stoica <cristianmarian.stoica@nxp.com>
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
7275e1fff6
commit
64beb5f811
@@ -83,6 +83,16 @@ lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void)
|
|||||||
return &default_handlers;
|
return &default_handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lv_draw_buf_handlers_t * lv_draw_buf_get_font_handlers(void)
|
||||||
|
{
|
||||||
|
return &font_draw_buf_handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
lv_draw_buf_handlers_t * lv_draw_buf_get_image_handlers(void)
|
||||||
|
{
|
||||||
|
return &image_cache_draw_buf_handlers;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format)
|
uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format)
|
||||||
{
|
{
|
||||||
return lv_draw_buf_width_to_stride_ex(&default_handlers, w, color_format);
|
return lv_draw_buf_width_to_stride_ex(&default_handlers, w, color_format);
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t * handlers,
|
|||||||
* @return pointer to the struct of handlers
|
* @return pointer to the struct of handlers
|
||||||
*/
|
*/
|
||||||
lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void);
|
lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void);
|
||||||
|
lv_draw_buf_handlers_t * lv_draw_buf_get_font_handlers(void);
|
||||||
|
lv_draw_buf_handlers_t * lv_draw_buf_get_image_handlers(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Align the address of a buffer. The buffer needs to be large enough for the real data after alignment
|
* Align the address of a buffer. The buffer needs to be large enough for the real data after alignment
|
||||||
|
|||||||
@@ -51,8 +51,12 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
|
|||||||
void lv_draw_buf_vglite_init_handlers(void)
|
void lv_draw_buf_vglite_init_handlers(void)
|
||||||
{
|
{
|
||||||
lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers();
|
lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers();
|
||||||
|
lv_draw_buf_handlers_t * font_handlers = lv_draw_buf_get_font_handlers();
|
||||||
|
lv_draw_buf_handlers_t * image_handlers = lv_draw_buf_get_image_handlers();
|
||||||
|
|
||||||
handlers->invalidate_cache_cb = _invalidate_cache;
|
handlers->invalidate_cache_cb = _invalidate_cache;
|
||||||
|
font_handlers->invalidate_cache_cb = _invalidate_cache;
|
||||||
|
image_handlers->invalidate_cache_cb = _invalidate_cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
|||||||
Reference in New Issue
Block a user