jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a0a9d8ae1bf0e8b1d3489ca80c6d82de3f0e227

commit 4a0a9d8ae1bf0e8b1d3489ca80c6d82de3f0e227
Author: Jiwon Kim <jwkim0...@gmail.com>
Date:   Mon Jan 2 15:22:04 2017 +0900

    evas: initalize orient property in file_set()
    
    Summary:
    Someone calls evas_object_image_file_set() and set orient,
    and then re-set another file.
    At that time, there is a mismatch between Evas_Image_Data's
    cur->orient and engine's orient data.
    
    So, "file_set(a) -> orient_set(90) -> file_set(b) -> orient_set(90)"
    is not working now.
    
    Therefore, when a file_set() is finished, initialization is needed.
    
    @fix
    
    Reviewers: jypark, jpeg
    
    Reviewed By: jpeg
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D4515
---
 src/lib/evas/canvas/evas_object_image.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index d81277f..fab1992 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -350,12 +350,14 @@ _evas_image_done_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj, Evas_Image_Dat
      {
         int w, h;
         int stride;
+        Evas_Image_Orient orient;
 
         ENFN->image_size_get(ENDT, o->engine_data, &w, &h);
         if (ENFN->image_stride_get)
           ENFN->image_stride_get(ENDT, o->engine_data, &stride);
         else
           stride = w * 4;
+        orient = ENFN->image_orient_get(ENDT, o->engine_data);
 
         EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
           {
@@ -368,6 +370,7 @@ _evas_image_done_set(Eo *eo_obj, Evas_Object_Protected_Data 
*obj, Evas_Image_Dat
              state_write->image.w = w;
              state_write->image.h = h;
              state_write->image.stride = stride;
+             state_write->orient = orient;
           }
         EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
      }
@@ -387,6 +390,7 @@ _evas_image_done_set(Eo *eo_obj, Evas_Object_Protected_Data 
*obj, Evas_Image_Dat
              state_write->image.w = 0;
              state_write->image.h = 0;
              state_write->image.stride = 0;
+             state_write->orient = EVAS_IMAGE_ORIENT_NONE;
           }
         EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
      }

-- 


Reply via email to