jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=25bcf4c64f0f694c538bf35fa37096387d4ca5a7

commit 25bcf4c64f0f694c538bf35fa37096387d4ca5a7
Author: Joogab Yun <joogab....@samsung.com>
Date:   Wed Nov 11 11:35:49 2015 +0900

    Evas: Fix bug in evas_cache_image_dirty()
    
    Summary: Code which shouldn't be removed was removed by 
'800279c23bdb0e925f112c96516dcc96a5487684'
    
    Reviewers: spacegrapher, cedric, jpeg
    
    Reviewed By: jpeg
    
    Subscribers: scholb.kim, dkdk, wonsik, cedric
    
    Differential Revision: https://phab.enlightenment.org/D3278
---
 src/lib/evas/cache/evas_cache_image.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/cache/evas_cache_image.c 
b/src/lib/evas/cache/evas_cache_image.c
index 6220fbc..f6fd2a7 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -973,16 +973,20 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, 
unsigned int y, unsigned
    cache = im->cache;
    if (!(im->flags.dirty))
      {
-        im_dirty = 
-          evas_cache_image_copied_data(cache, im->w, im->h, 
-                                       evas_cache_image_pixels(im), 
-                                       im->flags.alpha, im->space);
-        if (!im_dirty) goto on_error;
-        if (cache->func.debug) cache->func.debug("dirty-src", im);
-        cache->func.dirty(im_dirty, im);
-        if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
-        im_dirty->references = 1;
-        evas_cache_image_drop(im);
+        if (im->references == 1) im_dirty = im;
+        else
+          {
+             im_dirty =
+                evas_cache_image_copied_data(cache, im->w, im->h,
+                                             evas_cache_image_pixels(im),
+                                             im->flags.alpha, im->space);
+             if (!im_dirty) goto on_error;
+             if (cache->func.debug) cache->func.debug("dirty-src", im);
+             cache->func.dirty(im_dirty, im);
+             if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
+             im_dirty->references = 1;
+             evas_cache_image_drop(im);
+          }
         _evas_cache_image_dirty_add(im_dirty);
      }
 

-- 


Reply via email to