summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-06-12 10:10:23 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-06-12 10:10:23 -0700
commit79f36418ef6dcb340779d83c0f67d9fc92179b0c (patch)
tree24528465b0a43a3e35d6488c23d4af446ba56d48
parent03adadcda8d4adb58115c66550daa998a0cd555a (diff)
evas: cleanup use of Eina_Cow during orientation set.
-rw-r--r--src/lib/evas/canvas/evas_object_image.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 6737c07..820ca41 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -422,29 +422,23 @@ _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient or
422 int stride = 0; 422 int stride = 0;
423 423
424 o->engine_data = ENFN->image_orient_set(ENDT, o->engine_data, orient); 424 o->engine_data = ENFN->image_orient_set(ENDT, o->engine_data, orient);
425 ENFN->image_size_get(ENDT, o->engine_data, &iw, &ih);
426 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
427 {
428 state_write->image.w = iw;
429 state_write->image.h = ih;
430 }
431 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
432 if(o->engine_data) 425 if(o->engine_data)
433 { 426 {
434 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) 427 ENFN->image_size_get(ENDT, o->engine_data, &iw, &ih);
435 state_write->orient = orient;
436 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
437 428
438 if (ENFN->image_stride_get) 429 if (ENFN->image_stride_get)
439 ENFN->image_stride_get(ENDT, o->engine_data, &stride); 430 ENFN->image_stride_get(ENDT, o->engine_data, &stride);
440 else 431 else
441 stride = o->cur->image.w * 4; 432 stride = iw * 4;
442 if (o->cur->image.stride != stride) 433
434 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
443 { 435 {
444 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) 436 state_write->image.w = iw;
445 state_write->image.stride = stride; 437 state_write->image.h = ih;
446 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); 438 state_write->orient = orient;
439 state_write->image.stride = stride;
447 } 440 }
441 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
448 o->written = EINA_TRUE; 442 o->written = EINA_TRUE;
449 } 443 }
450 } 444 }