summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_image.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-13 22:13:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-14 11:14:36 +0900
commitcfedba598c23844946c5af2e038870c7ca6befdc (patch)
treeecd747ae9825ae3fcda730bc7f392fd787559e7e /src/lib/evas/canvas/evas_object_image.c
parent7b266b55188ebac499d70ffceb3b8c802bcdfbd0 (diff)
Evas render: Fix proxy source_clip with source images
In case the source is an Evas_Image, we skip proxy_subrender, and so the clip was not set against the source clip.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index a16562b344..0a525ba346 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3291,7 +3291,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
3291 int l, int t, int r, int b, Eina_Bool do_async) 3291 int l, int t, int r, int b, Eina_Bool do_async)
3292{ 3292{
3293 Evas_Image_Data *o = obj->private_data, *oi = NULL; 3293 Evas_Image_Data *o = obj->private_data, *oi = NULL;
3294 int imagew, imageh, uvw, uvh; 3294 int imagew, imageh, uvw, uvh, cw, ch;
3295 void *pixels; 3295 void *pixels;
3296 3296
3297 Evas_Object_Protected_Data *source = 3297 Evas_Object_Protected_Data *source =
@@ -3349,6 +3349,15 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
3349 imageh = oi->cur->image.h; 3349 imageh = oi->cur->image.h;
3350 uvw = source->cur->geometry.w; 3350 uvw = source->cur->geometry.w;
3351 uvh = source->cur->geometry.h; 3351 uvh = source->cur->geometry.h;
3352 /* check source_clip since we skip proxy_subrender here */
3353 if (o->proxy_src_clip)
3354 {
3355 ENFN->context_clip_clip(ENDT, context,
3356 source->cur->cache.clip.x + x,
3357 source->cur->cache.clip.y + y,
3358 source->cur->cache.clip.w,
3359 source->cur->cache.clip.h);
3360 }
3352 } 3361 }
3353 else 3362 else
3354 { 3363 {
@@ -3363,6 +3372,9 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
3363 o->proxyrendering = EINA_FALSE; 3372 o->proxyrendering = EINA_FALSE;
3364 } 3373 }
3365 3374
3375 ENFN->context_clip_get(ENDT, context, NULL, NULL, &cw, &ch);
3376 if (!cw || !ch) return;
3377
3366 if (pixels) 3378 if (pixels)
3367 { 3379 {
3368 Evas_Coord idw, idh, idx, idy; 3380 Evas_Coord idw, idh, idx, idy;