forked from enlightenment/efl
Evas render: Fix double-clipping issue with maps
Situation: - Evas Object A has a clip C and a map M. Problem: - Clip C will be applied once inside the map surface S and again when the surface S is drawn to the canvas. Solution: - Track whether the current object is the mapped object or a child of the mapped object. In the first case, discard the clipper when rendering to the map surface. In the second case, the child's clipper is PROBABLY[*] inside the map, so it should be applied when rendering the map surface itself. Note: This also applies to masks. [*] This is clearly not the ultimate clipping fix.
This commit is contained in:
parent
404ecdd8d7
commit
b0c6a32d68
|
@ -145,7 +145,7 @@ _texture_proxy_subrender(Evas_3D_Texture *obj)
|
|||
evas_render_mapped(e, pd->source, source, ctx, proxy_write->surface,
|
||||
-source->cur->geometry.x,
|
||||
-source->cur->geometry.y,
|
||||
1, 0, 0, e->output.w, e->output.h,
|
||||
2, 0, 0, e->output.w, e->output.h,
|
||||
&proxy_render_data, 1, EINA_FALSE, EINA_FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -1548,7 +1548,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
|
|||
if (obj->is_smart)
|
||||
{
|
||||
/* Clipper masks */
|
||||
if (obj->cur->clipper &&
|
||||
if (obj->cur->clipper && (mapped > 1) &&
|
||||
_evas_render_object_is_mask(obj->cur->clipper))
|
||||
{
|
||||
// This path can be hit when we're multiplying masks on top of each other...
|
||||
|
@ -1584,7 +1584,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
|
|||
{
|
||||
clean_them |= evas_render_mapped(e, obj2->object,
|
||||
obj2, ctx, surface,
|
||||
off_x, off_y, 1,
|
||||
off_x, off_y, mapped + 1,
|
||||
ecx, ecy, ecw, ech,
|
||||
proxy_render_data,
|
||||
level + 1,
|
||||
|
@ -1601,7 +1601,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (obj->cur->clipper)
|
||||
if (obj->cur->clipper && (mapped > 1))
|
||||
{
|
||||
if (_evas_render_has_map(eo_obj, obj) ||
|
||||
_evas_render_object_is_mask(obj->cur->clipper))
|
||||
|
@ -1639,7 +1639,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
|
|||
}
|
||||
}
|
||||
obj->func->render(eo_obj, obj, obj->private_data,
|
||||
e->engine.data.output, ctx,
|
||||
e->engine.data.output, ctx,
|
||||
surface, off_x, off_y, EINA_FALSE);
|
||||
}
|
||||
if (restore_image_clip)
|
||||
|
@ -1758,7 +1758,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
|||
evas_render_mapped(evas, eo_source, source, ctx, proxy_write->surface,
|
||||
-source->cur->geometry.x,
|
||||
-source->cur->geometry.y,
|
||||
1, 0, 0, evas->output.w, evas->output.h,
|
||||
2, 0, 0, evas->output.w, evas->output.h,
|
||||
&proxy_render_data, 1, EINA_TRUE, do_async);
|
||||
|
||||
ENFN->context_free(ENDT, ctx);
|
||||
|
@ -1910,7 +1910,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
|
|||
prev_mask->cur->geometry.y - y);
|
||||
}
|
||||
evas_render_mapped(evas, mask->object, mask, ctx, mdata->surface,
|
||||
-x, -y, 1, 0, 0, evas->output.w, evas->output.h,
|
||||
-x, -y, 2, 0, 0, evas->output.w, evas->output.h,
|
||||
NULL, level, EINA_TRUE, EINA_FALSE);
|
||||
ENFN->context_free(ENDT, ctx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue