diff options
author | Cedric Bail <cedric.bail@samsung.com> | 2013-06-25 16:20:46 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-06-25 16:20:46 +0900 |
commit | 75639bea4987f36fac3484bdd802b8ca8c462e8d (patch) | |
tree | 7dadf13b7f4c578c48bd90c5970aedbf3ba20eb5 | |
parent | 2dabd04dc85fa8486e93a54758b0dafc7905dfa2 (diff) | |
download | efl-75639bea4987f36fac3484bdd802b8ca8c462e8d.tar.gz |
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.c | 11 |
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) { Image_Entry_Task *task; - fprintf(stderr, "delete entry %p %p\n", ie, ie->f); if (!ie) return; if ((cache) && (cache->func.debug)) cache->func.debug("deleting", ie); if (ie->flags.delete_me == 1) return; @@ -777,13 +776,17 @@ evas_cache_image_mmap_request(Evas_Cache_Image *cache, /* find image by key in inactive/lru hash */ im = eina_hash_find(cache->mmap_inactiv, hkey); - if (im) goto on_ok; + if (im) + { + _evas_cache_image_lru_del(im); + _evas_cache_image_activ_add(im); + goto on_ok; + } im = _evas_cache_image_entry_new(cache, hkey, NULL, f, NULL, key, lo, error); if (!im) return NULL; on_ok: - fprintf(stderr, "new ref: %i\n", im->references); *error = EVAS_LOAD_ERROR_NONE; im->references++; return im; @@ -936,8 +939,6 @@ evas_cache_image_drop(Image_Entry *im) cache = im->cache; - fprintf(stderr, "%p ref: %i, im->f: %p, cache: %p\n", - im, references, im->f, cache); if (references == 0) { if (im->preload) |