evas: fix a stride value after calling evas_object_image_orient_set API

Summary: Before the value of stride is calculated, the weight and height of the rotated image should be set.

Test Plan: {F1409510}

Reviewers: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4955

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
Jaeyong Hwang 2017-06-12 10:06:14 -07:00 committed by Cedric Bail
parent 764194a892
commit 03adadcda8
1 changed files with 7 additions and 7 deletions

View File

@ -422,6 +422,13 @@ _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient or
int stride = 0;
o->engine_data = ENFN->image_orient_set(ENDT, o->engine_data, orient);
ENFN->image_size_get(ENDT, o->engine_data, &iw, &ih);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->image.w = iw;
state_write->image.h = ih;
}
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
if(o->engine_data)
{
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
@ -440,13 +447,6 @@ _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient or
}
o->written = EINA_TRUE;
}
ENFN->image_size_get(ENDT, o->engine_data, &iw, &ih);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->image.w = iw;
state_write->image.h = ih;
}
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
}
o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj);