off_x = cx - ux;
off_y = cy - uy;
/* build obscuring objects list (in order from bottom to top) */
+ if (alpha)
+ {
+ e->engine.func->context_clip_set(e->engine.data.output,
+ e->engine.data.context,
+ ux + off_x, uy + off_y, uw, uh);
+ }
for (i = 0; i < e->obscuring_objects.count; ++i)
{
obj = (Evas_Object *)eina_array_data_get
}
if (alpha)
{
- e->engine.func->context_clip_set(e->engine.data.output,
- e->engine.data.context,
- ux + off_x, uy + off_y, uw, uh);
e->engine.func->context_color_set(e->engine.data.output,
e->engine.data.context,
0, 0, 0, 0);
(obj->cur.visible) &&
(!obj->delete_me) &&
(obj->cur.cache.clip.visible) &&
- // (!obj->smart.smart) &&
+// (!obj->smart.smart) &&
((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND)))
{
int x, y, w, h;
else
e->engine.func->context_mask_unset(e->engine.data.output,
e->engine.data.context);
+ e->engine.func->context_clip_set(e->engine.data.output,
+ e->engine.data.context,
+ x, y, w, h);
#if 1 /* FIXME: this can slow things down... figure out optimum... coverage */
for (j = offset; j < e->temporary_objects.count; ++j)
{
_evas_render_cutout_add(e, obj2, off_x, off_y);
}
#endif
- e->engine.func->context_clip_set(e->engine.data.output,
- e->engine.data.context,
- x, y, w, h);
clean_them |= evas_render_mapped(e, obj, e->engine.data.context,
surface, off_x, off_y, 0,
cx, cy, cw, ch
EAPI Cutout_Rects*
evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc)
{
- Cutout_Rects* res;
+ Cutout_Rects* res, *res2;
int i;
int j;
active--;
}
}
+ /* merge rects */
+#define RI res->rects[i]
+#define RJ res->rects[j]
+ if (res->active > 1)
+ {
+ int found = 1;
+
+ while (found)
+ {
+ found = 0;
+ for (i = 0; i < res->active; i++)
+ {
+ for (j = i + 1; j < res->active; j++)
+ {
+ /* skip empty rects we are removing */
+ if (RJ.w == 0) continue;
+ /* check if its same width, immediately above or below */
+ if ((RJ.w == RI.w) && (RJ.x == RI.x))
+ {
+ if ((RJ.y + RJ.h) == RI.y) /* above */
+ {
+ RI.y = RJ.y;
+ RI.h += RJ.h;
+ RJ.w = 0;
+ found = 1;
+ }
+ else if ((RI.y + RI.h) == RJ.y) /* below */
+ {
+ RI.h += RJ.h;
+ RJ.w = 0;
+ found = 1;
+ }
+ }
+ /* check if its same height, immediately left or right */
+ else if ((RJ.h == RI.h) && (RJ.y == RI.y))
+ {
+ if ((RJ.x + RJ.w) == RI.x) /* left */
+ {
+ RI.x = RJ.x;
+ RI.w += RJ.w;
+ RJ.w = 0;
+ found = 1;
+ }
+ else if ((RI.x + RI.w) == RJ.x) /* right */
+ {
+ RI.w += RJ.w;
+ RJ.w = 0;
+ found = 1;
+ }
+ }
+ }
+ }
+ }
+ res2 = evas_common_draw_context_cutouts_new();
+ for (i = 0; i < res->active; i++)
+ {
+ if (RI.w == 0) continue;
+ evas_common_draw_context_cutouts_add(res2, RI.x, RI.y, RI.w, RI.h);
+ }
+ free(res->rects);
+ free(res);
+ return res2;
+ }
return res;
}