aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/lib/canvas/evas_clip.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-04-03 14:22:17 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-04-03 14:22:17 +0000
commitcb54bb2e60e351c6315f1ee9474e3924eb8abe71 (patch)
tree94dbc4808d48eb4b9b78d1431d5aa238b99120cf /legacy/evas/src/lib/canvas/evas_clip.c
parentfile and collection cache - this should remove a lot of file io... :) (diff)
downloadefl-cb54bb2e60e351c6315f1ee9474e3924eb8abe71.tar.gz
optimisipoos. (e17's menus should be more responsive now)
SVN revision: 14084
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_clip.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_clip.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_clip.c b/legacy/evas/src/lib/canvas/evas_clip.c
index c977f7b700..ad23c8f1f8 100644
--- a/legacy/evas/src/lib/canvas/evas_clip.c
+++ b/legacy/evas/src/lib/canvas/evas_clip.c
@@ -17,7 +17,8 @@ evas_object_clip_recalc(Evas_Object *obj)
cb = obj->cur.color.b; ca = obj->cur.color.a;
if (obj->cur.clipper)
{
- evas_object_clip_recalc(obj->cur.clipper);
+ if (obj->cur.clipper->cur.cache.clip.dirty)
+ 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;
@@ -44,17 +45,29 @@ evas_object_clip_recalc(Evas_Object *obj)
obj->cur.cache.clip.g = cg;
obj->cur.cache.clip.b = cb;
obj->cur.cache.clip.a = ca;
+ obj->cur.cache.clip.dirty = 0;
}
void
-evas_object_recalc_clippees(Evas_Object *obj)
+evas_object_clip_dirty(Evas_Object *obj)
{
Evas_List *l;
- evas_object_clip_recalc(obj);
+ obj->cur.cache.clip.dirty = 1;
for (l = obj->clip.clipees; l; l = l->next)
+ evas_object_clip_dirty(l->data);
+}
+
+void
+evas_object_recalc_clippees(Evas_Object *obj)
+{
+ Evas_List *l;
+
+ if (obj->cur.cache.clip.dirty)
{
- evas_object_recalc_clippees(l->data);
+ evas_object_clip_recalc(obj);
+ for (l = obj->clip.clipees; l; l = l->next)
+ evas_object_recalc_clippees(l->data);
}
}
@@ -178,6 +191,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
obj->cur.clipper = clip;
clip->clip.clipees = evas_list_append(clip->clip.clipees, obj);
evas_object_change(obj);
+ evas_object_clip_dirty(obj);
evas_object_recalc_clippees(obj);
if (!obj->smart.smart)
{
@@ -264,6 +278,7 @@ evas_object_clip_unset(Evas_Object *obj)
obj->cur.clipper->clip.clipees = evas_list_remove(obj->cur.clipper->clip.clipees, obj);
obj->cur.clipper = NULL;
evas_object_change(obj);
+ evas_object_clip_dirty(obj);
evas_object_recalc_clippees(obj);
if (!obj->smart.smart)
{