summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Nieminen <ext-pauli.nieminen@nokia.com>2011-02-01 17:49:20 +0200
committerPauli Nieminen <ext-pauli.nieminen@nokia.com>2011-02-04 17:36:16 +0200
commit80afc6d583bff95c2073e3dfbc71fe21e9e0c263 (patch)
tree338f45c57e9bd210870ae3c98eeeb77e2b879fd6
parentff78fd53dc8d66db991ce9220460b59199ab2fa5 (diff)
glx: Cleanup DRI2DrawableDRI2Drawable_refcnt
glx should cleanup DRI2Drawable when GLXDrawable is destroyed. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
-rw-r--r--glx/glxdri2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 027615ae2..79d7f55b9 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -89,6 +89,8 @@ struct __GLXDRIdrawable {
__DRIdrawable *driDrawable;
__GLXDRIscreen *screen;
DRI2DrawablePtr pDRI2Draw;
+ XID id;
+ ClientPtr client;
/* Dimensions as last reported by DRI2GetBuffers. */
int width;
@@ -102,6 +104,8 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
{
__GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
const __DRIcoreExtension *core = private->screen->core;
+
+ DRI2DestroyDrawable(private->client, private->pDRI2Draw, private->id);
(*core->destroyDrawable)(private->driDrawable);
@@ -479,6 +483,8 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
}
private->pDRI2Draw = DRI2GetDrawable(pDraw);
+ private->id = drawId;
+ private->client = client;
private->driDrawable =
(*driScreen->dri2->createNewDrawable)(driScreen->driScreen,