[PATCH 9/9] glx: Cleanup DRI2Drawable

Christopher James Halse Rogers christopher.halse.rogers at canonical.com
Thu Feb 3 18:34:26 PST 2011


On Thu, 2011-02-03 at 19:48 +0200, Pauli wrote:
> 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,

Reviewed-By: Christopher James Halse Rogers
<christopher.halse.rogers at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110204/4f4ccdd9/attachment.pgp>


More information about the xorg-devel mailing list