[xserver patch v7 4/5] dri2: Support the DRI2InvalidateBuffers event.

Michel Dänzer michel at daenzer.net
Tue Feb 23 10:56:29 PST 2010


On Tue, 2010-02-23 at 01:06 +0100, Francisco Jerez wrote: 
> @@ -618,11 +662,17 @@ SProcDRI2Dispatch (ClientPtr client)
>      }
>  }
>  
> -static int DRI2DrawableGone(pointer p, XID id)
> +static int
> +DRI2DrawableGone(pointer p, XID id)
>  {
> -    DrawablePtr pDrawable = p;
> +    DrawablePtr pDraw = p;
>  
> -    DRI2DestroyDrawable(pDrawable);
> +    if (pDraw->id != id) {
> +	/* Secondary reference. */
> +	DRI2UntrackClient(pDraw, id);
> +    } else {
> +	DRI2DestroyDrawable(pDraw);
> +    }

This hunk causes a DRI2 buffer leak here. Just reverting it seems to
work fine (with X/Mesa drivers not actually making use of the new
functionality yet).

Is pDraw->id == id ever true here? Can't DRI2DestroyDrawable() still be
called unconditionally?


P.S. Please avoid mixing superfluous whitespace / naming changes in with
actual functional changes.

-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the xorg-devel mailing list