[PATCH 1/2] glx: Enforce a 1:1 correspondence between GLX and X11 windows.
Kristian Høgsberg
krh at bitplanet.net
Thu Apr 8 18:48:11 PDT 2010
On Thu, Apr 8, 2010 at 9:02 PM, Keith Packard <keithp at keithp.com> wrote:
> On Thu, 8 Apr 2010 20:06:40 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
>
>> +static int glxWindowPrivateKeyIndex;
>> +static DevPrivateKey glxWindowPrivateKey = &glxWindowPrivateKeyIndex;
>
> Because there doesn't appear to be any performance critical use for this
> object, it should be in the resource database keyed off the window id
> using a new resource type. That will automatically get destroyed when
> the window is destroyed, which seems like exactly the semantic you desire.
It already is in the resource database and in some cases it has the
same XID as the window - it's the GLX drawable. The problem is that
we need to enforce a certain shutdown order: we have to destroy the
GLX drawable while the X drawable is still a valid pointer.
Alternatively we could NULL out the Drawable pointer in the GLX
drawable in the GLX DestroyWindow hook, but for that we still need to
the window private to be able to look up the GLX drawable for the
window. Do you have a better suggestion?
Kristian
More information about the xorg-devel
mailing list