aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/lib/canvas/evas_clip.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-09-01 21:37:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-09-01 21:37:10 +0000
commitbfab8b9254b3da02f7b629252726c40602b0a58d (patch)
treec6afc89646533a3fbb88c38b58da5a0e31d0d8be /legacy/evas/src/lib/canvas/evas_clip.c
parentEina Error messages in Edje Edit (diff)
downloadefl-bfab8b9254b3da02f7b629252726c40602b0a58d.tar.gz
now that mostly fixes this map clip issue... ugh. took a while to come up
with an elegant solution. also it does add overhead to fix. i might be able to improve the overhead. SVN revision: 51823
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_clip.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_clip.c62
1 files changed, 43 insertions, 19 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_clip.c b/legacy/evas/src/lib/canvas/evas_clip.c
index 1de20bc1dd..2bfa70fa83 100644
--- a/legacy/evas/src/lib/canvas/evas_clip.c
+++ b/legacy/evas/src/lib/canvas/evas_clip.c
@@ -70,42 +70,64 @@ evas_object_clippers_was_visible(Evas_Object *obj)
*
*/
+#define MAP_ACROSS 1
static void
-evas_object_child_map_across_mark(Evas_Object *obj, Eina_List *clippers,
- Eina_Bool map)
+evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force)
{
-#if 0
- if (map)
- {
- // if obj->cur.clipper is in clippers list, then set
- // obj->cur.clip_across_map to 1
- }
- else
+#ifdef MAP_ACROSS
+ if ((obj->cur.map_parent != map_obj) || force)
{
+ obj->cur.map_parent = map_obj;
+ obj->cur.cache.clip.dirty = 1;
+ evas_object_clip_recalc(obj);
+ if (obj->smart.smart)
+ {
+ Evas_Object *obj2;
+
+ EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+ {
+ // if obj has its own map - skip it. already done
+ if ((obj2->cur.map) && (obj2->cur.usemap)) continue;
+ evas_object_child_map_across_mark(obj2, map_obj, force);
+ }
+ }
}
#endif
}
+static void
+evas_object_clip_across_check(Evas_Object *obj)
+{
+ if (!obj->cur.clipper) return;
+ if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent)
+ evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1);
+}
+
+// this function is called on an object when map is enabled or disabled on it
+// thus creating a "map boundary" at that point.
+//
+// FIXME: smart member add/del and clip set/unset needs to check the new
+// smart parent (if any)
void
evas_object_mapped_clip_across_mark(Evas_Object *obj)
{
- return;
-#if 0
+#ifdef MAP_ACROSS
Eina_Bool map = 0;
if ((obj->cur.map) && (obj->cur.usemap)) map = 1;
+
if (map)
{
- Eina_List *list = NULL;
-
- // FIXME: list = build list of all clippers that are children of obj
- // up until any obj that has map applied to it. if map is applied
- // tghen we must assume this has been run before o9n that obj and
- // its children etc.
- evas_object_child_map_across_mark(obj, list, map);
+ evas_object_child_map_across_mark(obj, obj, 0);
}
else
- evas_object_child_map_across_mark(obj, NULL, map);
+ {
+ if (obj->smart.parent)
+ evas_object_child_map_across_mark
+ (obj, obj->smart.parent->cur.map_parent, 0);
+ else
+ evas_object_child_map_across_mark(obj, NULL, 0);
+ }
#endif
}
@@ -231,6 +253,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
obj->layer->evas->last_timestamp,
NULL);
}
+ evas_object_clip_across_check(obj);
}
/**
@@ -332,6 +355,7 @@ evas_object_clip_unset(Evas_Object *obj)
obj->layer->evas->last_timestamp,
NULL);
}
+ evas_object_clip_across_check(obj);
}
/**