feat(draw_buf): update lv_draw_buf_invalidate_cache API
This commit is contained in:
@@ -88,9 +88,9 @@ void * lv_draw_buf_align(void * data, lv_color_format_t color_format)
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
void lv_draw_buf_invalidate_cache(void * buf, size_t size)
|
||||
void lv_draw_buf_invalidate_cache(void * buf, uint32_t stride, lv_color_format_t color_format, const lv_area_t * area)
|
||||
{
|
||||
if(handlers.invalidate_cache_cb) handlers.invalidate_cache_cb(buf, size);
|
||||
if(handlers.invalidate_cache_cb) handlers.invalidate_cache_cb(buf, stride, color_format, area);
|
||||
}
|
||||
|
||||
void * lv_draw_buf_go_to_xy(const void * buf, uint32_t stride, lv_color_format_t color_format, lv_coord_t x,
|
||||
|
||||
@@ -30,7 +30,8 @@ typedef void (*lv_draw_buf_free_cb)(void * draw_buf);
|
||||
|
||||
typedef void * (*lv_draw_buf_align_cb)(void * buf, lv_color_format_t color_format);
|
||||
|
||||
typedef void (*lv_draw_buf_invalidate_cache_cb)(void * buf, size_t size);
|
||||
typedef void (*lv_draw_buf_invalidate_cache_cb)(void * buf, uint32_t stride, lv_color_format_t color_format,
|
||||
const lv_area_t * area);
|
||||
|
||||
typedef uint32_t (*lv_draw_buf_width_to_stride_cb)(uint32_t w, lv_color_format_t color_format);
|
||||
|
||||
@@ -96,9 +97,11 @@ void * lv_draw_buf_align(void * buf, lv_color_format_t color_format);
|
||||
/**
|
||||
* Invalidate the cache of the buffer
|
||||
* @param buf a memory address to invalidate
|
||||
* @param size length of the memory to invalidate in bytes
|
||||
* @param stride stride of the buffer
|
||||
* @param color_format color format of the buffer
|
||||
* @param area the area to invalidate in the buffer
|
||||
*/
|
||||
void lv_draw_buf_invalidate_cache(void * buf, size_t size);
|
||||
void lv_draw_buf_invalidate_cache(void * buf, uint32_t stride, lv_color_format_t color_format, const lv_area_t * area);
|
||||
|
||||
/**
|
||||
* Calculate the stride in bytes based on a width and color format
|
||||
|
||||
Reference in New Issue
Block a user