aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-06-19 11:19:07 +0200
committerMichel Dänzer <[email protected]>2009-06-19 18:00:49 +0200
commit9dfce365c7f35ddea6d81b7f595ddcd6d35382a5 (patch)
tree3a7f224a8253fcc939c7806adafe7b179d52d9dd /src/glx
parenta120778c72324bc56c63cd0f1873c6f2772228ea (diff)
Also release direct rendering resources in glXDestroyGLXPixmap.
Fixes leak running compiz with direct rendering.
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/glxcmds.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index ec3e69e4fe1..77471b8599c 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -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)