[PATCH 26/37] mi: miValidateTree based on paintable not viewable

Adam Jackson ajax at redhat.com
Wed Oct 8 08:04:50 PDT 2014


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/mivaltree.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index 8e4e9a9..95153d6 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -564,7 +564,7 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
     ScreenPtr pScreen;
     WindowPtr pWin;
     Bool overlap;
-    int viewvals;
+    int paintables = 0;
     Bool forward;
 
     pScreen = pParent->drawable.pScreen;
@@ -581,7 +581,6 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
      * children in their new configuration.
      */
     RegionNull(&totalClip);
-    viewvals = 0;
     if (RegionBroken(&pParent->clipList) && !RegionBroken(&pParent->borderClip)) {
         kind = VTBroken;
         /*
@@ -593,12 +592,12 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
         RegionIntersect(&totalClip, &totalClip, &pParent->winSize);
 
         for (pWin = pParent->firstChild; pWin != pChild; pWin = pWin->nextSib) {
-            if (pWin->viewable && !TreatAsTransparent(pWin))
+            if (pWin->paintable && !TreatAsTransparent(pWin))
                 RegionSubtract(&totalClip, &totalClip, &pWin->borderSize);
         }
         for (pWin = pChild; pWin; pWin = pWin->nextSib)
-            if (pWin->valdata && pWin->viewable)
-                viewvals++;
+            if (pWin->valdata && pWin->paintable)
+                paintables++;
 
         RegionEmpty(&pParent->clipList);
     }
@@ -610,8 +609,8 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
             for (pWin = pChild; pWin; pWin = pWin->nextSib) {
                 if (pWin->valdata) {
                     RegionAppend(&totalClip, getBorderClip(pWin));
-                    if (pWin->viewable)
-                        viewvals++;
+                    if (pWin->paintable)
+                        paintables++;
                 }
             }
         }
@@ -621,8 +620,8 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
             while (1) {
                 if (pWin->valdata) {
                     RegionAppend(&totalClip, getBorderClip(pWin));
-                    if (pWin->viewable)
-                        viewvals++;
+                    if (pWin->paintable)
+                        paintables++;
                 }
                 if (pWin == pChild)
                     break;
@@ -642,7 +641,7 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
     overlap = TRUE;
     if (kind != VTStack) {
         RegionUnion(&totalClip, &totalClip, &pParent->clipList);
-        if (viewvals > 1) {
+        if (paintables > 1) {
             /*
              * precompute childUnion to discover whether any of them
              * overlap.  This seems redundant, but performance studies
@@ -653,14 +652,14 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
             RegionNull(&childUnion);
             if (forward) {
                 for (pWin = pChild; pWin; pWin = pWin->nextSib)
-                    if (pWin->valdata && pWin->viewable &&
+                    if (pWin->valdata && pWin->paintable &&
                         !TreatAsTransparent(pWin))
                         RegionAppend(&childUnion, &pWin->borderSize);
             }
             else {
                 pWin = pParent->lastChild;
                 while (1) {
-                    if (pWin->valdata && pWin->viewable &&
+                    if (pWin->valdata && pWin->paintable &&
                         !TreatAsTransparent(pWin))
                         RegionAppend(&childUnion, &pWin->borderSize);
                     if (pWin == pChild)
@@ -675,7 +674,7 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
     }
 
     for (pWin = pChild; pWin != NullWindow; pWin = pWin->nextSib) {
-        if (pWin->viewable) {
+        if (pWin->paintable) {
             if (pWin->valdata) {
                 RegionIntersect(&childClip, &totalClip, &pWin->borderSize);
                 miComputeClips(pWin, pScreen, &childClip, kind, &exposed);
-- 
1.9.3



More information about the xorg-devel mailing list