summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_render.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_render.c')
-rw-r--r--src/lib/evas/canvas/evas_render.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index fdd0645872..f81300b04d 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1208,21 +1208,35 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p
1208{ 1208{
1209 const Evas_Coord_Rectangle *clip; 1209 const Evas_Coord_Rectangle *clip;
1210 Evas_Object_Protected_Data *clipper; 1210 Evas_Object_Protected_Data *clipper;
1211 int cw, ch;
1211 1212
1212 /* cache.clip can not be relied on, since the evas is frozen, but we need 1213 /* cache.clip can not be relied on, since the evas is frozen, but we need
1213 * to set the clip. so we recurse from clipper to clipper until we reach 1214 * to set the clip. so we recurse from clipper to clipper until we reach
1214 * the source object's clipper */ 1215 * the source object's clipper */
1215 1216
1216 if (!proxy_render_data || proxy_render_data->source_clip) return EINA_TRUE; 1217 if (!proxy_render_data) return EINA_TRUE;
1218 if (proxy_render_data->source_clip)
1219 {
1220 /* trust cache.clip since we clip like the source */
1221 ENFN->context_clip_clip(ENDT, ctx,
1222 obj->cur->cache.clip.x + off_x,
1223 obj->cur->cache.clip.y + off_y,
1224 obj->cur->cache.clip.w, obj->cur->cache.clip.h);
1225 ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
1226 return (cw && ch);
1227 }
1228
1217 if (!obj || !obj->cur->clipper) return EINA_TRUE; 1229 if (!obj || !obj->cur->clipper) return EINA_TRUE;
1218 1230
1219 clipper = obj->cur->clipper; 1231 clipper = obj->cur->clipper;
1220 if (!clipper->cur->visible) return EINA_FALSE; 1232 if (!clipper->cur->visible) return EINA_FALSE;
1221 clip = &clipper->cur->geometry; 1233 clip = &clipper->cur->geometry;
1222 ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h); 1234 ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h);
1235 ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
1236 if (!cw || !ch) return EINA_FALSE;
1223 1237
1224 /* stop if we found the source object's clipper */ 1238 /* stop if we found the source object's clipper */
1225 if (clipper == proxy_render_data->proxy_obj->cur->clipper) return EINA_TRUE; 1239 if (clipper == proxy_render_data->src_obj->cur->clipper) return EINA_TRUE;
1226 1240
1227 /* recurse to the clipper itself */ 1241 /* recurse to the clipper itself */
1228 return _proxy_context_clip(evas, ctx, proxy_render_data, clipper, off_x, off_y); 1242 return _proxy_context_clip(evas, ctx, proxy_render_data, clipper, off_x, off_y);
@@ -1236,7 +1250,7 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj
1236 1250
1237 if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip; 1251 if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip;
1238 1252
1239 if (proxy_src_clip && !evas->is_frozen) 1253 if (proxy_src_clip)
1240 { 1254 {
1241 x = obj->cur->cache.clip.x; 1255 x = obj->cur->cache.clip.x;
1242 y = obj->cur->cache.clip.y; 1256 y = obj->cur->cache.clip.y;