[xserver patch v4 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows.
Jesse Barnes
jbarnes at virtuousgeek.org
Tue Apr 6 10:22:47 PDT 2010
On Mon, 8 Feb 2010 19:25:14 +0100
Francisco Jerez <currojerez at riseup.net> wrote:
> The spec says (regarding glXCreateWindow): "If there is already a
> GLXFBConfig associated with win (as a result of a previous
> glXCreateWindow call), then a BadAlloc error is generated.". It will
> also come useful to implement DRI2InvalidateBuffers for the indirect
> case.
>
> Signed-off-by: Francisco Jerez <currojerez at riseup.net>
> ---
> glx/glxcmds.c | 51 +++++++++++++++++++++++++++++++++++++++++++++------
> glx/glxserver.h | 1 +
> 2 files changed, 46 insertions(+), 6 deletions(-)
>
> diff --git a/glx/glxcmds.c b/glx/glxcmds.c
> index 77afbf4..0e1c89c 100644
> --- a/glx/glxcmds.c
> +++ b/glx/glxcmds.c
> @@ -51,6 +51,15 @@
> #include "indirect_table.h"
> #include "indirect_util.h"
>
> +static int glxWindowPrivateKeyIndex;
> +static DevPrivateKey glxWindowPrivateKey = &glxWindowPrivateKeyIndex;
> +
> +__GLXdrawable *
> +glxGetDrawableFromWindow(WindowPtr pWin)
> +{
> + return dixLookupPrivate(&pWin->devPrivates, glxWindowPrivateKey);
> +}
Thanks for pointing this out. Can we use this in
glxscreens.c:glxDestroyWindow() to invalidate the drawable pointer in
the glx drawable at window destroy time? That would be a good way to
fix https://bugs.freedesktop.org/show_bug.cgi?id=26394; probably better
than trying to mix in (or totally switch to) XIDs for tracking things.
--
Jesse Barnes, Intel Open Source Technology Center
More information about the xorg-devel
mailing list