[PATCH 11/37] dix: Lower backStorage to a bit instead of a pointer

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


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 composite/compinit.c | 4 ++--
 dix/window.c         | 2 +-
 include/windowstr.h  | 2 +-
 mi/miexpose.c        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/composite/compinit.c b/composite/compinit.c
index 48e938f..111c16e 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -119,12 +119,12 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
         pScreen->backingStoreSupport != NotUseful) {
         if (pWin->backingStore != NotUseful && !pWin->backStorage) {
             compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
-            pWin->backStorage = (void *) (intptr_t) 1;
+            pWin->backStorage = TRUE;
         }
         else if (pWin->backingStore == NotUseful && pWin->backStorage) {
             compUnredirectWindow(serverClient, pWin,
                                  CompositeRedirectAutomatic);
-            pWin->backStorage = NULL;
+            pWin->backStorage = FALSE;
         }
     }
 
diff --git a/dix/window.c b/dix/window.c
index f227e4c..e1645c3 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -362,7 +362,7 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->cursorIsNone = TRUE;
 
     pWin->backingStore = NotUseful;
-    pWin->backStorage = (void *) NULL;
+    pWin->backStorage = 0;
 
     pWin->mapped = FALSE;       /* off */
     pWin->realized = FALSE;     /* off */
diff --git a/include/windowstr.h b/include/windowstr.h
index 81f5f8c..740f4a6 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -144,12 +144,12 @@ typedef struct _Window {
     Mask eventMask;             /* mask from the creating client */
     PixUnion background;
     PixUnion border;
-    void *backStorage;          /* null when BS disabled */
     WindowOptPtr optional;
     unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
     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;
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 555f3b2..de8ee6c 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -143,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
     if (!pGC->graphicsExposures &&
         (pDstDrawable->type == DRAWABLE_PIXMAP) &&
         ((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
-         (((WindowPtr) pSrcDrawable)->backStorage == NULL)))
+         (((WindowPtr) pSrcDrawable)->backStorage == 0)))
         return NULL;
 
     srcBox.x1 = srcx;
-- 
1.9.3



More information about the xorg-devel mailing list