Browse Source

Also release direct rendering resources in glXDestroyGLXPixmap.

Fixes leak running compiz with direct rendering.
tags/mesa_7_5_rc4
Michel Dänzer 16 years ago
parent
commit
9dfce365c7
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      src/glx/x11/glxcmds.c

+ 14
- 0
src/glx/x11/glxcmds.c View File

@@ -869,6 +869,20 @@ PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap)
req->glxpixmap = glxpixmap;
UnlockDisplay(dpy);
SyncHandle();

#ifdef GLX_DIRECT_RENDERING
{
int screen;
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, glxpixmap, &screen);
__GLXscreenConfigs *psc = &priv->screenConfigs[screen];

if (pdraw != NULL) {
(*pdraw->destroyDrawable) (pdraw);
__glxHashDelete(psc->drawHash, glxpixmap);
}
}
#endif
}

PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)

Loading…
Cancel
Save