glx: Don't use __glXInitialize() when we might be holding __glXLock()
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 20 Jul 2010 01:00:09 +0000 (21:00 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 20 Jul 2010 02:45:51 +0000 (22:45 -0400)
src/glx/dri2_glx.c
src/glx/glxclient.h
src/glx/glxext.c

index 032d620a3435e56266fb6ee968f98344137f6277..6ac03cf0cfb45f24858f59426c69fdd5e10d56f6 100644 (file)
@@ -186,11 +186,8 @@ dri2DestroyDrawable(__GLXDRIdrawable *base)
 {
    struct dri2_screen *psc = (struct dri2_screen *) base->psc;
    struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
-   __GLXdisplayPrivate *dpyPriv;
-   struct dri2_display *pdp;
-
-   dpyPriv = __glXInitialize(base->psc->dpy);
-   pdp = (struct dri2_display *)dpyPriv->dri2Display;
+   __GLXdisplayPrivate *dpyPriv = psc->base.display;
+   struct dri2_display *pdp = (struct dri2_display *)dpyPriv->dri2Display;
 
    __glxHashDelete(pdp->dri2Hash, pdraw->base.xDrawable);
    (*psc->core->destroyDrawable) (pdraw->driDrawable);
index 65dc26b3fcc60483d17cc4aff437fe7d26ee7046..207908f7e25925c1d219f2bcefb3f769c72d2c30 100644 (file)
@@ -523,6 +523,8 @@ struct __GLXscreenConfigsRec
     */
    const struct glx_context_vtable *direct_context_vtable;
 
+   __GLXdisplayPrivate *display;
+
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     /**
      * Per screen direct rendering interface functions and data.
index 320246cc4f27e0d7e55f9657ea652f8b2628445f..445592f1a8a2a452fb47d46fc022e16379c56b63 100644 (file)
@@ -759,6 +759,7 @@ glx_screen_init(__GLXscreenConfigs *psc,
    psc->scr = screen;
    psc->dpy = priv->dpy;
    psc->drawHash = __glxHashCreate();
+   psc->display = priv;
    if (psc->drawHash == NULL)
       return GL_FALSE;