/* Invalidate an image source in the cache. Useful if the image source is updated therefore it needs to be cached again.  */
void lv_img_cache_invalidate_src(const void *src)
/* Invalidate an image source in the cache. Useful if the image source is updated therefore it needs to be cached again.  */
void lv_img_cache_invalidate_src(const void *src)
{
    lv_img_cache_entry_t * cache = LV_GC_ROOT(_lv_img_cache_array);
    uint16_t i;
    for(i = 0; i < entry_cnt; i++) {
        if(cache[i].dec_dsc.src == src || src == NULL) {
            if(cache[i].dec_dsc.src != NULL) {
                lv_img_decoder_close(&cache[i].dec_dsc);
            }
            memset(&cache[i].dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
            memset(&cache[i], 0, sizeof(lv_img_cache_entry_t));
        }
    }
}