[PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

Michel Dänzer michel at daenzer.net
Fri Jul 9 01:11:35 PDT 2010


On Don, 2010-07-08 at 14:55 -0700, Jesse Barnes wrote: 
> On Thu, 08 Jul 2010 14:19:23 -0700
> Keith Packard <keithp at keithp.com> wrote:
> 
> > On Thu, 8 Jul 2010 14:06:01 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> > > Ok, back to tracking serials then.
> > > 
> > > Unfortunately, using the pixmap serial for windows doesn't actually fix
> > > this bug.  See below, maybe something is wrong with my
> > > DRI2DrawableSerial function.  Using the drawable serial unconditionally
> > > lets things work (just like the old patch).
> > 
> > I'm betting the screen pixmap serial doesn't get bumped when it gets
> > resized. Fixing ModifyPixmapHeader might help here?
> 
> Ah yep, looks like that was it.  Fixed patch below.  Kristian and
> Keith, if it looks ok I'll resubmit with changelog and your reviewed-by
> tags.

[...]

> diff --git a/mi/miscrinit.c b/mi/miscrinit.c
> index ea2a0c1..661ecb2 100644
> --- a/mi/miscrinit.c
> +++ b/mi/miscrinit.c
> @@ -76,7 +76,6 @@ miModifyPixmapHeader(PixmapPtr pPixmap, int width,
> int height, int depth,
>         pPixmap->drawable.depth = depth;
>         pPixmap->drawable.bitsPerPixel = bitsPerPixel;
>         pPixmap->drawable.id = 0;
> -       pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
>         pPixmap->drawable.x = 0;
>         pPixmap->drawable.y = 0;
>         pPixmap->drawable.width = width;
> @@ -116,6 +115,7 @@ miModifyPixmapHeader(PixmapPtr pPixmap, int width,
> int height, int depth,
>         if (pPixData)
>             pPixmap->devPrivate.ptr = pPixData;
>      }
> +    pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
>      return TRUE;
>  }
> 

This should be in a patch of its own.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list