[PATCH 13/18] dix: Lower backStorage to a bit instead of a pointer

Jasper St. Pierre jstpierre at mecheye.net
Tue Sep 23 12:03:52 PDT 2014


On Tue, Sep 23, 2014 at 12:32 PM, Adam Jackson <ajax at redhat.com> wrote:

> 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;
>

Here you use TRUE / 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;
>

Here you use 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;
>

Here you use 0.

Why the inconsistency?


>      srcBox.x1 = srcx;
> --
> 1.9.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>



-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140923/cc951d58/attachment.html>


More information about the xorg-devel mailing list