lv_image_cache.h

Functions

lv_result_t lv_image_cache_init(uint32_t size)

Initialize image cache.

参数:

size -- size of the cache in bytes.

返回:

LV_RESULT_OK: initialization succeeded, LV_RESULT_INVALID: failed.

void lv_image_cache_resize(uint32_t new_size, bool evict_now)

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

参数:
  • new_size -- new size of the cache in bytes.

  • evict_now -- true: evict the images should be removed by the eviction policy, false: wait for the next cache cleanup.

void lv_image_cache_drop(const void *src)

Invalidate image cache. Use NULL to invalidate all images.

参数:

src -- pointer to an image source.

bool lv_image_cache_is_enabled(void)

Return true if the image cache is enabled.

返回:

true: enabled, false: disabled.