mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
feat(draw_buf): modify cache_invalidate API
use void lv_draw_buf_invalidate_cache(void * buf, size_t size) for more flexibility see https://github.com/lvgl/lvgl/issues/4597#issuecomment-1750569534
This commit is contained in:
parent
d9b4283e0e
commit
e12ac1ae9c
@ -102,9 +102,9 @@ void * lv_draw_buf_align_buf(void * data, lv_color_format_t color_format)
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
void lv_draw_buf_invalidate_cache(lv_draw_buf_t * draw_buf, const char * area)
|
||||
void lv_draw_buf_invalidate_cache(void * buf, size_t size)
|
||||
{
|
||||
if(handlers.invalidate_cache_cb) handlers.invalidate_cache_cb(draw_buf, area);
|
||||
if(handlers.invalidate_cache_cb) handlers.invalidate_cache_cb(buf, size);
|
||||
}
|
||||
|
||||
void * lv_draw_buf_go_to_xy(lv_draw_buf_t * draw_buf, lv_coord_t x, lv_coord_t y)
|
||||
|
@ -42,7 +42,7 @@ typedef void (*lv_draw_buf_free_cb)(void * draw_buf);
|
||||
|
||||
typedef void * (*lv_draw_buf_align_buf_cb)(void * buf, lv_color_format_t color_format);
|
||||
|
||||
typedef void (*lv_draw_buf_invalidate_cache_cb)(lv_draw_buf_t * draw_buf, const char * area);
|
||||
typedef void (*lv_draw_buf_invalidate_cache_cb)(void * buf, size_t size);
|
||||
|
||||
typedef uint32_t (*lv_draw_buf_width_to_stride_cb)(uint32_t w, lv_color_format_t color_format);
|
||||
|
||||
@ -135,10 +135,10 @@ void * lv_draw_buf_get_buf(lv_draw_buf_t * draw_buf);
|
||||
|
||||
/**
|
||||
* Invalidate the cache of the buffer
|
||||
* @param draw_buf pointer to a draw buffer
|
||||
* @param arae the whose cache needs to be invalidated
|
||||
* @param buf a memory address to invalidate
|
||||
* @param size length of the memory to invalidate in bytes
|
||||
*/
|
||||
void lv_draw_buf_invalidate_cache(lv_draw_buf_t * draw_buf, const char * area);
|
||||
void lv_draw_buf_invalidate_cache(void * buf, size_t size);
|
||||
|
||||
/**
|
||||
* Calculate the stride in bytes based on a width and color format
|
||||
|
Loading…
x
Reference in New Issue
Block a user