xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 11 17:29:19 UTC 2019


 dix/window.c  |   49 ++++++++++++++++++++++---------------------------
 mi/mibitblt.c |    4 ++--
 mi/micopy.c   |    5 ++---
 3 files changed, 26 insertions(+), 32 deletions(-)

New commits:
commit f665a9c9e6c8643f3050378249db3088ae3057be
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Sep 30 12:26:28 2014 -0400

    mi: Shortcut miDoCopy/miCopyArea based on clipList
    
    This is maybe one more comparison, but it catches FullyObscured windows
    slightly earlier, so it's kind of a wash. The important thing is this
    allows for paintable but unmapped windows, which will have non-empty
    clipList.

diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 43d9bd917..4f7e29170 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -92,9 +92,9 @@ miCopyArea(DrawablePtr pSrcDrawable,
     srcx = xIn + pSrcDrawable->x;
     srcy = yIn + pSrcDrawable->y;
 
-    /* If the destination isn't realized, this is easy */
+    /* If the destination is clipped away, this is easy */
     if (pDstDrawable->type == DRAWABLE_WINDOW &&
-        !((WindowPtr) pDstDrawable)->realized)
+        RegionNil(&((WindowPtr)pDstDrawable)->clipList))
         return NULL;
 
     /* clip the source */
diff --git a/mi/micopy.c b/mi/micopy.c
index 12cdad4ad..4db128c4f 100644
--- a/mi/micopy.c
+++ b/mi/micopy.c
@@ -152,10 +152,9 @@ miDoCopy(DrawablePtr pSrcDrawable,
     Bool fastDst = FALSE;       /* for fast clipping with one rect dest */
     Bool fastExpose = FALSE;    /* for fast exposures with pixmap source */
 
-    /* Short cut for unmapped windows */
-
+    /* Short cut for unmapped or fully clipped windows */
     if (pDstDrawable->type == DRAWABLE_WINDOW &&
-        !((WindowPtr) pDstDrawable)->realized) {
+        RegionNil(&((WindowPtr)pDstDrawable)->clipList)) {
         return NULL;
     }
 
commit 3904216b01fd9dabee65e6cb120fa8aad5e8b459
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Mar 6 17:03:58 2019 -0500

    dix: Outdent Unmap{Window,Subwindows} a bit
    
    No functional change, just folding some conditionals together.

diff --git a/dix/window.c b/dix/window.c
index f4ace76c7..ec94a8843 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2856,13 +2856,11 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
     pWin->mapped = FALSE;
     if (wasRealized)
         UnrealizeTree(pWin, fromConfigure);
-    if (wasViewable) {
-        if (!fromConfigure) {
-            (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
-            (*pScreen->HandleExposures) (pLayerWin->parent);
-            if (pScreen->PostValidateTree)
-                (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
-        }
+    if (wasViewable && !fromConfigure) {
+        (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
+        (*pScreen->HandleExposures) (pLayerWin->parent);
+        if (pScreen->PostValidateTree)
+            (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
     }
     if (wasRealized && !fromConfigure) {
         WindowsRestructured();
@@ -2909,31 +2907,28 @@ UnmapSubwindows(WindowPtr pWin)
                 UnrealizeTree(pChild, FALSE);
         }
     }
-    if (wasViewable) {
-        if (anyMarked) {
-            if (pLayerWin->parent == pWin)
-                (*pScreen->MarkWindow) (pWin);
-            else {
-                WindowPtr ptmp;
+    if (wasViewable && anyMarked) {
+        if (pLayerWin->parent == pWin)
+            (*pScreen->MarkWindow) (pWin);
+        else {
+            WindowPtr ptmp;
 
-                (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL);
-                (*pScreen->MarkWindow) (pLayerWin->parent);
+            (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL);
+            (*pScreen->MarkWindow) (pLayerWin->parent);
 
-                /* Windows between pWin and pLayerWin may not have been marked */
-                ptmp = pWin;
+            /* Windows between pWin and pLayerWin may not have been marked */
+            ptmp = pWin;
 
-                while (ptmp != pLayerWin->parent) {
-                    (*pScreen->MarkWindow) (ptmp);
-                    ptmp = ptmp->parent;
-                }
-                pHead = pWin->firstChild;
+            while (ptmp != pLayerWin->parent) {
+                (*pScreen->MarkWindow) (ptmp);
+                ptmp = ptmp->parent;
             }
-            (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
-            (*pScreen->HandleExposures) (pLayerWin->parent);
-            if (pScreen->PostValidateTree)
-                (*pScreen->PostValidateTree) (pLayerWin->parent, pHead,
-                                              VTUnmap);
+            pHead = pWin->firstChild;
         }
+        (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
+        (*pScreen->HandleExposures) (pLayerWin->parent);
+        if (pScreen->PostValidateTree)
+            (*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap);
     }
     if (wasRealized) {
         WindowsRestructured();


More information about the xorg-commit mailing list