evas: Add code to change the object's chage flag in evas_object_image_data_set

Summary:
When using evas_object_image_data_set(obj, data), if you give the value of data to NULL, the image data is free.
However, Since you have not set a flag in the image object to be modified, it will not be processed in the next render loop.
Eventually, the image data is erased, but you see the image before it was erased.
If evas_object_image_data_update_add() is used to solve this problem, the operation of the function is skipped because the values of w and h in image are 0.
So, If data is NULL, I modified it to call evas_object_change() in evas_object_image_data_set().

Test Plan:
Sample code

{F61599}
{F61601}

Reviewers: Hermet, jiin.moon, eunue, jpeg

Reviewed By: jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4520
This commit is contained in:
Jaeyong Hwang 2017-01-03 16:08:56 +09:00 committed by Jean-Philippe Andre
parent e1b6e9b18a
commit 3f84aac424
1 changed files with 5 additions and 1 deletions

View File

@ -593,7 +593,11 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
else
{
if (o->engine_data)
ENFN->image_free(ENDT, o->engine_data);
{
ENFN->image_free(ENDT, o->engine_data);
o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj);
}
o->load_error = EVAS_LOAD_ERROR_NONE;
if ((o->cur->image.w != 0) || (o->cur->image.h != 0))
resize_call = EINA_TRUE;