lv_image_cache.h

API reference for lv_image_cache.h

Report on GitHub
Summary

Functions

lv_image_cache_init

Initialize image cache.

 
lv_result_t lv_image_cache_init(uint32_t size)
Parameters
NameTypeDescription
sizeuint32_tsize of the cache in bytes.

Returns: lv_result_t — LV_RESULT_OK: initialization succeeded, LV_RESULT_INVALID: failed.

lv_image_cache_resize

Resize image cache. If set to 0, the cache will be disabled.

 
void lv_image_cache_resize(uint32_t new_size, bool evict_now)
Parameters
NameTypeDescription
new_sizeuint32_tnew size of the cache in bytes.
evict_nowbooltrue: evict the images should be removed by the eviction policy, false: wait for the next cache cleanup.

lv_image_cache_drop

Invalidate image cache. Use NULL to invalidate all images.

 
void lv_image_cache_drop(const void *src)
Parameters
NameTypeDescription
srcconst void *pointer to an image source.

lv_image_cache_is_enabled

Return true if the image cache is enabled.

 
bool lv_image_cache_is_enabled(void)

Returns: bool — true: enabled, false: disabled.

lv_image_cache_iter_create

Create an iterator to iterate over the image cache.

 
lv_iter_t * lv_image_cache_iter_create(void)

Returns: lv_iter_t * — an iterator to iterate over the image cache.

lv_image_cache_dump

Dump the content of the image cache in a human-readable format with cache order.

 
void lv_image_cache_dump(void)

Dependencies

How is this guide?

Last updated on

On this page