{
const Evas_Coord_Rectangle *clip;
Evas_Object_Protected_Data *clipper;
+ int cw, ch;
/* cache.clip can not be relied on, since the evas is frozen, but we need
* to set the clip. so we recurse from clipper to clipper until we reach
* the source object's clipper */
- if (!proxy_render_data || proxy_render_data->source_clip) return EINA_TRUE;
+ if (!proxy_render_data) return EINA_TRUE;
+ if (proxy_render_data->source_clip)
+ {
+ /* trust cache.clip since we clip like the source */
+ ENFN->context_clip_clip(ENDT, ctx,
+ obj->cur->cache.clip.x + off_x,
+ obj->cur->cache.clip.y + off_y,
+ obj->cur->cache.clip.w, obj->cur->cache.clip.h);
+ ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
+ return (cw && ch);
+ }
+
if (!obj || !obj->cur->clipper) return EINA_TRUE;
clipper = obj->cur->clipper;
if (!clipper->cur->visible) return EINA_FALSE;
clip = &clipper->cur->geometry;
ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h);
+ ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
+ if (!cw || !ch) return EINA_FALSE;
/* stop if we found the source object's clipper */
- if (clipper == proxy_render_data->proxy_obj->cur->clipper) return EINA_TRUE;
+ if (clipper == proxy_render_data->src_obj->cur->clipper) return EINA_TRUE;
/* recurse to the clipper itself */
return _proxy_context_clip(evas, ctx, proxy_render_data, clipper, off_x, off_y);
if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip;
- if (proxy_src_clip && !evas->is_frozen)
+ if (proxy_src_clip)
{
x = obj->cur->cache.clip.x;
y = obj->cur->cache.clip.y;
static int
eng_context_clip_get(void *data EINA_UNUSED, void *context, int *x, int *y, int *w, int *h)
{
- *x = ((RGBA_Draw_Context *)context)->clip.x;
- *y = ((RGBA_Draw_Context *)context)->clip.y;
- *w = ((RGBA_Draw_Context *)context)->clip.w;
- *h = ((RGBA_Draw_Context *)context)->clip.h;
+ if (x) *x = ((RGBA_Draw_Context *)context)->clip.x;
+ if (y) *y = ((RGBA_Draw_Context *)context)->clip.y;
+ if (w) *w = ((RGBA_Draw_Context *)context)->clip.w;
+ if (h) *h = ((RGBA_Draw_Context *)context)->clip.h;
return ((RGBA_Draw_Context *)context)->clip.use;
}