[PATCH] Revert "composite: Convert compWindowUpdate to use TraverseTree"

Adam Jackson ajax at redhat.com
Mon Dec 13 10:38:28 PST 2010


This reverts commit 648c8871c92727d7b6b16859f27f12266a06a16e.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32077

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 composite/compwindow.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/composite/compwindow.c b/composite/compwindow.c
index bbd5756..22d2374 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -653,9 +653,10 @@ compWindowFormat (WindowPtr pWin)
 }
 
 static void
-compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen)
+compWindowUpdateAutomatic (WindowPtr pWin)
 {
     CompWindowPtr   cw = GetCompWindow (pWin);
+    ScreenPtr	    pScreen = pWin->drawable.pScreen;
     WindowPtr	    pParent = pWin->parent;
     PixmapPtr	    pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin);
     PictFormatPtr   pSrcFormat = compWindowFormat (pWin);
@@ -678,7 +679,8 @@ compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen)
     /*
      * First move the region from window to screen coordinates
      */
-    RegionTranslate(pRegion, pWin->drawable.x, pWin->drawable.y);
+    RegionTranslate(pRegion,
+		      pWin->drawable.x, pWin->drawable.y);
 
     /*
      * Clip against the "real" border clip
@@ -688,7 +690,8 @@ compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen)
     /*
      * Now translate from screen to dest coordinates
      */
-    RegionTranslate(pRegion, -pParent->drawable.x, -pParent->drawable.y);
+    RegionTranslate(pRegion,
+		      -pParent->drawable.x, -pParent->drawable.y);
 
     /*
      * Clip the picture
@@ -717,26 +720,23 @@ compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen)
     DamageEmpty (cw->damage);
 }
 
-static int
-compWindowUpdateVisit(WindowPtr pWin, void *data)
+void
+compWindowUpdate (WindowPtr pWin)
 {
+    WindowPtr	pChild;
+
+    for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib)
+	compWindowUpdate (pChild);
     if (pWin->redirectDraw != RedirectDrawNone)
     {
-	CompWindowPtr cw = GetCompWindow(pWin);
+	CompWindowPtr	cw = GetCompWindow(pWin);
+
 	if (cw->damaged)
 	{
-	    compWindowUpdateAutomatic(pWin, data);
+	    compWindowUpdateAutomatic (pWin);
 	    cw->damaged = FALSE;
 	}
     }
-
-    return WT_WALKCHILDREN;
-}
-
-void
-compWindowUpdate (WindowPtr pWin)
-{
-    TraverseTree(pWin, compWindowUpdateVisit, pWin->drawable.pScreen);
 }
 
 WindowPtr
-- 
1.7.3.2



More information about the xorg-devel mailing list