From e8694d3d05d3518bed63ab9983b215003fd47109 Mon Sep 17 00:00:00 2001 From: Jiyoun Park Date: Tue, 19 Apr 2011 18:59:06 +0900 Subject: [PATCH] Evas_cache_image : fix double deletion we check cache entry before insert Change-Id: I0e025ffd1ed8aee9ce20134e8916116f2804a5ee --- debian/changelog | 8 ++++++++ src/lib/cache/evas_cache_image.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5560fd4..929ef47 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +evas (1.0.0.001+svn.58227slp2+build05) unstable; urgency=low + + * [Fix Bug] fix evas cache inactive problem + * Git: 165.213.180.234:slp/pkgs/e/evas + * Tag: evas_1.0.0.001+svn.58227slp2+build05 + + -- Jiyoun Park Tue, 19 Apr 2011 18:48:32 +0900 + evas (1.0.0.001+svn.58227slp2+build04) unstable; urgency=low * [Fix Bug] fix evas cache double free problem diff --git a/src/lib/cache/evas_cache_image.c b/src/lib/cache/evas_cache_image.c index 7104d2f..b48e53f 100644 --- a/src/lib/cache/evas_cache_image.c +++ b/src/lib/cache/evas_cache_image.c @@ -89,6 +89,7 @@ static void _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry static void _evas_cache_image_make_dirty(Evas_Cache_Image *cache, Image_Entry *im) { + if (im->flags.dirty) return; im->flags.cached = 1; im->flags.dirty = 1; im->flags.activ = 0; @@ -113,6 +114,7 @@ _evas_cache_image_make_activ(Evas_Cache_Image *cache, Image_Entry *im, const char *key) { /* FIXME: Handle case when image is being processed anyway and don't do a double decode. */ + if (im->flags.activ) return; im->cache_key = key; if (key) { @@ -138,6 +140,7 @@ static void _evas_cache_image_make_inactiv(Evas_Cache_Image *cache, Image_Entry *im, const char *key) { + if (!im->flags.activ) return; if (im->cache_key) { im->flags.activ = 0; @@ -179,6 +182,7 @@ _evas_cache_image_remove_lru_nodata(Evas_Cache_Image *cache, Image_Entry *im) static void _evas_cache_image_activ_lru_nodata(Evas_Cache_Image *cache, Image_Entry *im) { + if (!im->flags.lru_nodata) return; im->flags.need_data = 0; im->flags.lru_nodata = 1; #ifdef EVAS_FRAME_QUEUING -- 2.7.4