[PATCH v2 10/10] glx: Cleanup DRI2Drawable
Pauli
ext-pauli.nieminen at nokia.com
Tue Feb 8 13:42:56 PST 2011
From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
glx should cleanup DRI2Drawable when GLXDrawable is destroyed.
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
glx/glxdri2.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 027615a..79d7f55 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,
--
1.7.0.4
More information about the xorg-devel
mailing list