xserver: Branch 'master' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 12 22:33:28 UTC 2019


 composite/compinit.c |    6 ++----
 dix/window.c         |    7 ++++++-
 include/windowstr.h  |    1 -
 mi/miexpose.c        |    9 +--------
 4 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 6975807945d12c07f00e18df7fafeff43efa0267
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Mar 14 16:37:35 2019 -0400

    dix: Remove WindowRec::backStorage
    
    This is only being set, never read.

diff --git a/composite/compinit.c b/composite/compinit.c
index 539dc0460..b19b3da62 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -110,12 +110,10 @@ compCheckBackingStore(WindowPtr pWin)
 {
     if (pWin->backingStore != NotUseful) {
         compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
-        pWin->backStorage = TRUE;
     }
     else {
         compUnredirectWindow(serverClient, pWin,
                              CompositeRedirectAutomatic);
-        pWin->backStorage = FALSE;
     }
 }
 
diff --git a/dix/window.c b/dix/window.c
index d99b61c02..b9c79ce95 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -484,7 +484,6 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->cursorIsNone = TRUE;
 
     pWin->backingStore = NotUseful;
-    pWin->backStorage = 0;
 
     pWin->mapped = FALSE;       /* off */
     pWin->realized = FALSE;     /* off */
diff --git a/include/windowstr.h b/include/windowstr.h
index bf31b9eee..c7e27965e 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -149,7 +149,6 @@ typedef struct _Window {
     unsigned borderIsPixel:1;
     unsigned cursorIsNone:1;    /* else real cursor (might inherit) */
     unsigned backingStore:2;
-    unsigned backStorage:1;     /* if bs is allocated */
     unsigned saveUnder:1;
     unsigned bitGravity:4;
     unsigned winGravity:4;
commit 0f477cc68bbfe37555f73313dcc50b303c3ca210
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Mar 14 16:34:40 2019 -0400

    dix, composite: Optimize setting window backing store state
    
    We hide CWBackingStore from the screen hook if nothing's actually
    changing, which means compChangeWindowAttributes no longer needs to
    compare the requested state with the present one.

diff --git a/composite/compinit.c b/composite/compinit.c
index 6ea33ea4e..539dc0460 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -108,11 +108,11 @@ compInstallColormap(ColormapPtr pColormap)
 static void
 compCheckBackingStore(WindowPtr pWin)
 {
-    if (pWin->backingStore != NotUseful && !pWin->backStorage) {
+    if (pWin->backingStore != NotUseful) {
         compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
         pWin->backStorage = TRUE;
     }
-    else if (pWin->backingStore == NotUseful && pWin->backStorage) {
+    else {
         compUnredirectWindow(serverClient, pWin,
                              CompositeRedirectAutomatic);
         pWin->backStorage = FALSE;
diff --git a/dix/window.c b/dix/window.c
index ec94a8843..d99b61c02 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -1328,6 +1328,12 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
                 client->errorValue = val;
                 goto PatchUp;
             }
+            /* if we're not actually changing the window's state, hide
+             * CWBackingStore from vmaskCopy so it doesn't get passed to
+             * ->ChangeWindowAttributes below
+             */
+            if (pWin->backingStore == val)
+                continue;
             pWin->backingStore = val;
             break;
         case CWBackingPlanes:
commit 4e101e7e3b4d3e6cdb38f1cd60a764aaade5c4a2
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Mar 14 16:19:02 2019 -0400

    mi: Simplify a conditional in miHandleExposures
    
    miHandleExposures does two things: computes the region for which to
    generate expose events, and (if the destination is a window) paints the
    exposed regions with the background. The bit of this conditional we're
    deleting here asserts that the source is either a pixmap or a window
    without backing store. The only other possibility is a window _with_
    backing store. In the old backing store implementation, this was where
    you would recover bits from backing store. Since our "backing store" is
    the redirected window pixmap, we know we've already copied all we could,
    because CopyArea had already seen the entire window pixmap. So now in
    that third case, we are still drawing to a pixmap (so there's no
    background to paint) and we are still not generating events, so we can
    exit early.
    
    The comment above the function about recovering bits from backing store
    is clearly misleading, so delete that too.

diff --git a/mi/miexpose.c b/mi/miexpose.c
index c34530c34..d84bb6a98 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -112,10 +112,6 @@ the region package can call this.
 non-existent areas to non-obscured areas of the destination.  Paint the
 background for the region, if the destination is a window.
 
-NOTE:
-     this should generally be called, even if graphicsExposures is false,
-because this is where bits get recovered from backing store.
-
 */
 
 RegionPtr
@@ -140,10 +136,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
     Bool extents;
 
     /* avoid work if we can */
-    if (!pGC->graphicsExposures &&
-        (pDstDrawable->type == DRAWABLE_PIXMAP) &&
-        ((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
-         (((WindowPtr) pSrcDrawable)->backStorage == 0)))
+    if (!pGC->graphicsExposures && pDstDrawable->type == DRAWABLE_PIXMAP)
         return NULL;
 
     srcBox.x1 = srcx;


More information about the xorg-commit mailing list