aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_object_image.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-07 20:03:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-12 13:40:20 +0900
commit512fb7f193975d411b4f471c14e1f0171e52e7d3 (patch)
treeda94e5fe995d253d1239d8b0d4aa0814cae142b2 /src/lib/evas/canvas/evas_object_image.c
parenteeze - fix if formatting to be consistent within file (diff)
downloadefl-512fb7f193975d411b4f471c14e1f0171e52e7d3.tar.gz
Evas snapshot: Fix proxies of snapshot objects
This was broken because the wrong image size was used in the proxy's fast path (proxy of another image). Why did snapshot use a specific surface_w,h instead of reusing the usual cur->image.w,h? (@cedric) Simplify code.
Diffstat (limited to 'src/lib/evas/canvas/evas_object_image.c')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 7214b9af0d..6b05037921 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -69,8 +69,6 @@ struct _Evas_Object_Image_Pixels
Evas_Video_Surface video;
unsigned int video_caps;
-
- int surface_w, surface_h; /* used by snapshot feature */
};
struct _Evas_Object_Image_State
@@ -3313,8 +3311,8 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
else if (obj->cur->snapshot)
{
pixels = o->engine_data;
- imagew = o->pixels->surface_w;
- imageh = o->pixels->surface_h;
+ imagew = o->cur->image.w;
+ imageh = o->cur->image.h;
uvw = imagew;
uvh = imageh;
}
@@ -4790,24 +4788,24 @@ _evas_object_image_surface_get(Evas_Object *eo, Evas_Object_Protected_Data *obj)
Evas_Image_Data *pd = eo_data_scope_get(eo, EVAS_IMAGE_CLASS);
if (pd->engine_data &&
- pd->pixels->surface_w == obj->cur->geometry.w &&
- pd->pixels->surface_h == obj->cur->geometry.h)
+ (pd->cur->image.w == obj->cur->geometry.w) &&
+ (pd->cur->image.h == obj->cur->geometry.h))
return pd->engine_data;
if (pd->engine_data)
ENFN->image_free(ENDT, pd->engine_data);
// FIXME: alpha forced to 1 for now, need to figure out Evas alpha here
- EINA_COW_PIXEL_WRITE_BEGIN(pd, pixi_write)
+ EINA_COW_IMAGE_STATE_WRITE_BEGIN(pd, state_write)
{
pd->engine_data = ENFN->image_map_surface_new(ENDT,
obj->cur->geometry.w,
obj->cur->geometry.h,
1);
- pixi_write->surface_w = obj->cur->geometry.w;
- pixi_write->surface_h = obj->cur->geometry.h;
+ state_write->image.w = obj->cur->geometry.w;
+ state_write->image.h = obj->cur->geometry.h;
}
- EINA_COW_PIXEL_WRITE_END(pd, pixi_write);
+ EINA_COW_IMAGE_STATE_WRITE_END(pd, state_write);
return pd->engine_data;
}