aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorjiin.moon <jiin.moon@samsung.com>2015-06-29 13:55:57 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-29 14:56:23 +0200
commit739eb4bd0d241aa607766fa1278aa1acd6dbfb92 (patch)
treeba8accbcae4c9157459db3062608709bdaf04880 /src/lib
parentEo: Remove redundant semicolon. (diff)
downloadefl-739eb4bd0d241aa607766fa1278aa1acd6dbfb92.tar.gz
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>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 344a8496f8..83b3ee7eec 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -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);