summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-06-25 16:20:46 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-06-25 16:20:46 +0900
commit75639bea4987f36fac3484bdd802b8ca8c462e8d (patch)
tree7dadf13b7f4c578c48bd90c5970aedbf3ba20eb5
parent2dabd04dc85fa8486e93a54758b0dafc7905dfa2 (diff)
evas: don't forget to remove image from the lru when they are back to active.
-rw-r--r--src/lib/evas/cache/evas_cache_image.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c
index d5e58e2882..475afbad88 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -173,7 +173,6 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
173{ 173{
174 Image_Entry_Task *task; 174 Image_Entry_Task *task;
175 175
176 fprintf(stderr, "delete entry %p %p\n", ie, ie->f);
177 if (!ie) return; 176 if (!ie) return;
178 if ((cache) && (cache->func.debug)) cache->func.debug("deleting", ie); 177 if ((cache) && (cache->func.debug)) cache->func.debug("deleting", ie);
179 if (ie->flags.delete_me == 1) return; 178 if (ie->flags.delete_me == 1) return;
@@ -777,13 +776,17 @@ evas_cache_image_mmap_request(Evas_Cache_Image *cache,
777 776
778 /* find image by key in inactive/lru hash */ 777 /* find image by key in inactive/lru hash */
779 im = eina_hash_find(cache->mmap_inactiv, hkey); 778 im = eina_hash_find(cache->mmap_inactiv, hkey);
780 if (im) goto on_ok; 779 if (im)
780 {
781 _evas_cache_image_lru_del(im);
782 _evas_cache_image_activ_add(im);
783 goto on_ok;
784 }
781 785
782 im = _evas_cache_image_entry_new(cache, hkey, NULL, f, NULL, key, lo, error); 786 im = _evas_cache_image_entry_new(cache, hkey, NULL, f, NULL, key, lo, error);
783 if (!im) return NULL; 787 if (!im) return NULL;
784 788
785 on_ok: 789 on_ok:
786 fprintf(stderr, "new ref: %i\n", im->references);
787 *error = EVAS_LOAD_ERROR_NONE; 790 *error = EVAS_LOAD_ERROR_NONE;
788 im->references++; 791 im->references++;
789 return im; 792 return im;
@@ -936,8 +939,6 @@ evas_cache_image_drop(Image_Entry *im)
936 939
937 cache = im->cache; 940 cache = im->cache;
938 941
939 fprintf(stderr, "%p ref: %i, im->f: %p, cache: %p\n",
940 im, references, im->f, cache);
941 if (references == 0) 942 if (references == 0)
942 { 943 {
943 if (im->preload) 944 if (im->preload)