evas: opaque value does not change even if image data be changed

Summary:
opaque value keeps previous image's value
when image data be changed by file_set/mmap_set api

@fix

Test Plan:
1) Make a evas rectangle object has color
2) Make a evas image object with jpg file.
3) Replace image data with png file by evas_object_image_file_set.

Reviewers: Hermet, cedric, jypark

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
jiin.moon 2015-06-29 13:55:57 +02:00 committed by Cedric BAIL
parent 6107f235aa
commit 739eb4bd0d
1 changed files with 6 additions and 4 deletions

View File

@ -425,8 +425,8 @@ _image_init_set(const Eina_File *f, const char *file, const char *key,
{
if (!state_write->mmaped_source)
eina_stringshare_del(state_write->u.file);
else if (state_write->u.f)
eina_file_close(state_write->u.f);
else if (state_write->u.f)
eina_file_close(state_write->u.f);
state_write->u.f = eina_file_dup(f);
}
else
@ -434,13 +434,15 @@ _image_init_set(const Eina_File *f, const char *file, const char *key,
if (!state_write->mmaped_source)
eina_stringshare_replace(&state_write->u.file, file);
else
{
{
if (state_write->u.f) eina_file_close(state_write->u.f);
state_write->u.file = eina_stringshare_add(file);
}
}
}
state_write->mmaped_source = !!f;
eina_stringshare_replace(&state_write->key, key);
state_write->opaque_valid = 0;
}
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);