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

Jesse Barnes jbarnes at virtuousgeek.org
Fri Jul 9 10:35:30 PDT 2010


On Fri, 09 Jul 2010 10:11:35 +0200
Michel Dänzer <michel at daenzer.net> wrote:

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

Agreed.  Will post the set now.

-- 
Jesse Barnes, Intel Open Source Technology Center


More information about the xorg-devel mailing list