[PATCH] DRI2: track drawable serial numbers
Jesse Barnes
jbarnes at virtuousgeek.org
Sat Jul 3 10:33:41 PDT 2010
On Fri, 02 Jul 2010 23:54:26 -0400
Keith Packard <keithp at keithp.com> wrote:
> On Fri, 2 Jul 2010 12:26:34 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
>
> > If a pixmap header is modified or the drawable serial changes, some
> > aspects of the drawable are likely to have changed so we should
> > re-allocate the corresponding DRI2 drawable in that case. This is one
> > way of catching when the root window pixmap changes through xrandr.
>
> For windows, you might use the serial number of the window pixmap
> instead of the window serial number.
Ok I can try that. The issue I'm trying to resolve is related to a
randr resize.
If you start up a GL app at say 640x480 on a 1440x900 display, then
resize the display using xrandr down to 640x480, the DDX will try page
flipping. However, we won't have reallocated the DRI2 buffers because
the sizes still match. That means we won't have flinked the new front
buffer pixmap, so the first flip after the resize will fail. At least
that's what I think is going on.
So I wanted a way to check whether the root pixmap had changed and
force a DRI2 reallocation at that point. I didn't see a wrapper for
that (ConfigNotify doesn't get called on xrandr resize) but the pixmap
sequence looked like a pretty good fit.
--
Jesse Barnes, Intel Open Source Technology Center
More information about the xorg-devel
mailing list