evas: hopefully the last clip bug fix.
If no one see breakage due to this, I will backport all of them in two days. SVN revision: 57934
This commit is contained in:
parent
6c286d5c52
commit
2b3ee3f630
|
@ -7,6 +7,8 @@ evas_object_clip_dirty(Evas_Object *obj)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *data;
|
Evas_Object *data;
|
||||||
|
|
||||||
|
if (obj->cur.cache.clip.dirty) return ;
|
||||||
|
|
||||||
obj->cur.cache.clip.dirty = 1;
|
obj->cur.cache.clip.dirty = 1;
|
||||||
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
|
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
|
||||||
evas_object_clip_dirty(data);
|
evas_object_clip_dirty(data);
|
||||||
|
|
|
@ -881,21 +881,6 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
|
||||||
obj->cur.geometry.w,
|
obj->cur.geometry.w,
|
||||||
obj->cur.geometry.h);
|
obj->cur.geometry.h);
|
||||||
|
|
||||||
if (obj->cur.clipper)
|
|
||||||
{
|
|
||||||
if (_evas_render_has_map(obj))
|
|
||||||
evas_object_clip_recalc(obj);
|
|
||||||
RECTS_CLIP_TO_RECT(x, y, w, h,
|
|
||||||
obj->cur.cache.clip.x + off_x,
|
|
||||||
obj->cur.cache.clip.y + off_y,
|
|
||||||
obj->cur.cache.clip.w,
|
|
||||||
obj->cur.cache.clip.h);
|
|
||||||
RECTS_CLIP_TO_RECT(x, y, w, h,
|
|
||||||
obj->cur.clipper->cur.cache.clip.x + off_x,
|
|
||||||
obj->cur.clipper->cur.cache.clip.y + off_y,
|
|
||||||
obj->cur.clipper->cur.cache.clip.w,
|
|
||||||
obj->cur.clipper->cur.cache.clip.h);
|
|
||||||
}
|
|
||||||
e->engine.func->context_clip_set(e->engine.data.output,
|
e->engine.func->context_clip_set(e->engine.data.output,
|
||||||
ctx, x, y, w, h);
|
ctx, x, y, w, h);
|
||||||
obj->func->render(obj, e->engine.data.output, ctx,
|
obj->func->render(obj, e->engine.data.output, ctx,
|
||||||
|
@ -1126,10 +1111,10 @@ evas_render_updates_internal(Evas *e,
|
||||||
|
|
||||||
/* phase 1. add extra updates for changed objects */
|
/* phase 1. add extra updates for changed objects */
|
||||||
if (e->invalidate || e->render_objects.count <= 0)
|
if (e->invalidate || e->render_objects.count <= 0)
|
||||||
clean_them = _evas_render_phase1_process(e,
|
clean_them = _evas_render_phase1_process(e,
|
||||||
&e->active_objects,
|
&e->active_objects,
|
||||||
&e->restack_objects,
|
&e->restack_objects,
|
||||||
&e->delete_objects,
|
&e->delete_objects,
|
||||||
&e->render_objects,
|
&e->render_objects,
|
||||||
&redraw_all);
|
&redraw_all);
|
||||||
|
|
||||||
|
|
|
@ -204,28 +204,33 @@ evas_object_clip_recalc(Evas_Object *obj)
|
||||||
else cvis = obj->cur.visible;
|
else cvis = obj->cur.visible;
|
||||||
cr = obj->cur.color.r; cg = obj->cur.color.g;
|
cr = obj->cur.color.r; cg = obj->cur.color.g;
|
||||||
cb = obj->cur.color.b; ca = obj->cur.color.a;
|
cb = obj->cur.color.b; ca = obj->cur.color.a;
|
||||||
if ((obj->cur.clipper) &&
|
if (obj->cur.clipper)
|
||||||
(obj->cur.clipper->cur.map_parent == obj->cur.map_parent))
|
|
||||||
{
|
{
|
||||||
// this causes problems... hmmm
|
// this causes problems... hmmm
|
||||||
if (obj->cur.clipper->cur.cache.clip.dirty)
|
if (obj->cur.clipper->cur.cache.clip.dirty)
|
||||||
evas_object_clip_recalc(obj->cur.clipper);
|
evas_object_clip_recalc(obj->cur.clipper);
|
||||||
nx = obj->cur.clipper->cur.cache.clip.x;
|
|
||||||
ny = obj->cur.clipper->cur.cache.clip.y;
|
|
||||||
nw = obj->cur.clipper->cur.cache.clip.w;
|
|
||||||
nh = obj->cur.clipper->cur.cache.clip.h;
|
|
||||||
RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
|
|
||||||
|
|
||||||
nvis = obj->cur.clipper->cur.cache.clip.visible;
|
// I don't know why this test was here in the first place. As I have
|
||||||
nr = obj->cur.clipper->cur.cache.clip.r;
|
// no issue showing up due to this, I keep it and move color out of it.
|
||||||
ng = obj->cur.clipper->cur.cache.clip.g;
|
if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent)
|
||||||
nb = obj->cur.clipper->cur.cache.clip.b;
|
{
|
||||||
na = obj->cur.clipper->cur.cache.clip.a;
|
nx = obj->cur.clipper->cur.cache.clip.x;
|
||||||
cvis = cvis * nvis;
|
ny = obj->cur.clipper->cur.cache.clip.y;
|
||||||
cr = (cr * (nr + 1)) >> 8;
|
nw = obj->cur.clipper->cur.cache.clip.w;
|
||||||
cg = (cg * (ng + 1)) >> 8;
|
nh = obj->cur.clipper->cur.cache.clip.h;
|
||||||
cb = (cb * (nb + 1)) >> 8;
|
RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
|
||||||
ca = (ca * (na + 1)) >> 8;
|
}
|
||||||
|
|
||||||
|
nvis = obj->cur.clipper->cur.cache.clip.visible;
|
||||||
|
nr = obj->cur.clipper->cur.cache.clip.r;
|
||||||
|
ng = obj->cur.clipper->cur.cache.clip.g;
|
||||||
|
nb = obj->cur.clipper->cur.cache.clip.b;
|
||||||
|
na = obj->cur.clipper->cur.cache.clip.a;
|
||||||
|
cvis = cvis * nvis;
|
||||||
|
cr = (cr * (nr + 1)) >> 8;
|
||||||
|
cg = (cg * (ng + 1)) >> 8;
|
||||||
|
cb = (cb * (nb + 1)) >> 8;
|
||||||
|
ca = (ca * (na + 1)) >> 8;
|
||||||
}
|
}
|
||||||
if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0;
|
if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0;
|
||||||
obj->cur.cache.clip.x = cx;
|
obj->cur.cache.clip.x = cx;
|
||||||
|
|
Loading…
Reference in New Issue