[PATCH 2/2] miDbe window priv priv is pre-allocated, no need to use dixSetPrivate

Magnus Kessler Magnus.Kessler at gmx.net
Fri Jul 2 02:35:25 PDT 2010


On Thursday 01 Jul 2010 14:47:52 Keith Packard wrote:
> miDbeInit pre-allocates space in each DBE window private private for a
> MiDbeWindowPrivPrivRec. miDbeAllocBackBufferName used the
> pre-allocated space correctly (simply fetching it instead of
> allocating a new piece of memory). However, it then called
> dixSetPrivate anyways, which isn't necessary, and (in the new
> dixPrivate world) causes an assert failure.
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  dbe/midbe.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/dbe/midbe.c b/dbe/midbe.c
> index 954f46e..b43ac1b 100644
> --- a/dbe/midbe.c
> +++ b/dbe/midbe.c
> @@ -202,12 +202,6 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId,
> int swapAction) return (rc == Success) ? BadAlloc : rc;
>          }
> 
> -
> -        /* Attach the priv priv to the priv. */
> -	dixSetPrivate(&pDbeWindowPriv->devPrivates, miDbeWindowPrivPrivKey,
> -		      pDbeWindowPrivPriv);
> -
> -
>          /* Clear the back buffer. */
>          pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen);
>          if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC))

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=28639 for me.

Tested-by: Magnus Kessler <Magnus.Kessler at gmx.net>
Reviewed-by: Magnus Kessler <Magnus.Kessler at gmx.net>


More information about the xorg-devel mailing list