diff options
Diffstat (limited to 'src/lib/evas')
-rw-r--r-- | src/lib/evas/cache/evas_cache_image.c | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 52447df9d0..adc38a86ec 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c | |||
@@ -796,28 +796,42 @@ evas_cache_image_mmap_request(Evas_Cache_Image *cache, | |||
796 | /* find image by key in active mmap hash */ | 796 | /* find image by key in active mmap hash */ |
797 | SLKL(engine_lock); | 797 | SLKL(engine_lock); |
798 | im = eina_hash_find(cache->mmap_activ, hkey); | 798 | im = eina_hash_find(cache->mmap_activ, hkey); |
799 | if ((im) && (!im->load_failed)) goto on_ok; | 799 | if (im) |
800 | else if ((im) && (im->load_failed)) | ||
801 | { | 800 | { |
802 | _evas_cache_image_dirty_add(im); | 801 | if (im->f != f) |
803 | im = NULL; | 802 | { |
803 | /* as active cache find - if we match in lru and its invalid, dirty */ | ||
804 | _evas_cache_image_dirty_add(im); | ||
805 | /* this image never used, so it have to be deleted */ | ||
806 | _evas_cache_image_entry_delete(cache, im); | ||
807 | im = NULL; | ||
808 | } | ||
809 | else if (!im->load_failed) goto on_ok; | ||
810 | else if (im->load_failed) | ||
811 | { | ||
812 | _evas_cache_image_dirty_add(im); | ||
813 | im = NULL; | ||
814 | } | ||
804 | } | 815 | } |
805 | 816 | ||
806 | /* find image by key in inactive/lru hash */ | 817 | /* find image by key in inactive/lru hash */ |
807 | im = eina_hash_find(cache->mmap_inactiv, hkey); | 818 | im = eina_hash_find(cache->mmap_inactiv, hkey); |
808 | if ((im) && (!im->load_failed)) | 819 | if (im) |
809 | { | ||
810 | _evas_cache_image_lru_del(im); | ||
811 | _evas_cache_image_activ_add(im); | ||
812 | goto on_ok; | ||
813 | } | ||
814 | else if ((im) && (im->load_failed)) | ||
815 | { | 820 | { |
816 | /* as active cache find - if we match in lru and its invalid, dirty */ | 821 | if (im->f != f) |
817 | _evas_cache_image_dirty_add(im); | 822 | { |
818 | /* this image never used, so it have to be deleted */ | 823 | /* as active cache find - if we match in lru and its invalid, dirty */ |
819 | _evas_cache_image_entry_delete(cache, im); | 824 | _evas_cache_image_dirty_add(im); |
820 | im = NULL; | 825 | /* this image never used, so it have to be deleted */ |
826 | _evas_cache_image_entry_delete(cache, im); | ||
827 | im = NULL; | ||
828 | } | ||
829 | else if (!im->load_failed) | ||
830 | { | ||
831 | _evas_cache_image_lru_del(im); | ||
832 | _evas_cache_image_activ_add(im); | ||
833 | goto on_ok; | ||
834 | } | ||
821 | } | 835 | } |
822 | 836 | ||
823 | im = _evas_cache_image_entry_new(cache, hkey, NULL, f, NULL, key, lo, error); | 837 | im = _evas_cache_image_entry_new(cache, hkey, NULL, f, NULL, key, lo, error); |