Author: toshok
Date: 2007-09-22 16:37:01 -0400 (Sat, 22 Sep 2007)
New Revision: 86222

Modified:
   trunk/moon/src/dirty.cpp
Log:
add some comments

Modified: trunk/moon/src/dirty.cpp
===================================================================
--- trunk/moon/src/dirty.cpp    2007-09-22 19:00:21 UTC (rev 86221)
+++ trunk/moon/src/dirty.cpp    2007-09-22 20:37:01 UTC (rev 86222)
@@ -55,6 +55,26 @@
        down_dirty = g_slist_remove (down_dirty, element);
 }
 
+/*
+** There are 2 types of changes that need to propagate around the
+** tree.
+**
+** 1. Those changes that need to be propagated from parent to children
+**    (transformation, opacity).  We call these Downward Changes, and
+**    the elements are placed in the down_dirty list.
+**
+** 2. Those changes that need to be propagated from children to parent
+**    (bounds, invalidation).  We call these Upward Changes, and the
+**    elements are placed in the up_dirty list.
+**
+**
+** Downward Changes can result in new Upward changes (when an
+** element's transform changes, usually its bounds change), so when
+** processing the dirty list we push changes down the tree before
+** handling the Upward Changes.
+**
+*/
+
 void
 process_dirty_elements ()
 {
@@ -63,6 +83,17 @@
                GSList *link = down_dirty;
                UIElement* el = (UIElement*)link->data;
 
+               /*
+               ** since we cache N's local (from N's parent to N)
+               ** transform, we need to catch if we're changing
+               ** something about that local transform and recompute
+               ** it.
+               ** 
+               ** DirtyLocalTransform implies DirtyTransform, since
+               ** changing N's local transform requires updating the
+               ** transform of all descendents in the subtree rooted
+               ** at N.
+               */
                if (el->dirty_flags & DirtyLocalTransform) {
                        el->dirty_flags &= ~DirtyLocalTransform;
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to