Comment 39 for bug 328232

Revision history for this message
In , portis (portis24) wrote :

This patch does not work for me. Memory usage still increases.
And compiz leads to an X crash.

On Thu, Apr 23, 2009 at 4:45 PM, <email address hidden> wrote:

> http://bugs.freedesktop.org/show_bug.cgi?id=20704
>
>
>
>
>
> --- Comment #34 from Shuang He <email address hidden> 2009-04-23 07:45:55
> PST ---
> Seems pixmaps get refcnt incremented during I830DRI2CreateBuffers, but not
> dereferencing it corespondingly. Haven't tried this out, hope it would
> help:
>
> diff --git a/src/i830_dri.c b/src/i830_dri.c
> index 6a32492..633895b 100644
> --- a/src/i830_dri.c
> +++ b/src/i830_dri.c
> @@ -1618,11 +1618,20 @@ I830DRI2DestroyBuffers(DrawablePtr pDraw,
> DRI2BufferPtr
> buffers, int count)
> {
> ScreenPtr pScreen = pDraw->pScreen;
> I830DRI2BufferPrivatePtr private;
> + PixmapPtr pDepthPixmap = NULL;
> int i;
>
> for (i = 0; i < count; i++)
> {
> private = buffers[i].driverPrivate;
> + if (buffers[i].attachment == DRI2BufferFrontLeft ||
> + buffers[i].attachment == DRI2BufferStencil && pDepthPixmap) {
> + private->pPixmap->refcnt--;
> + }
> +
> + if (buffers[i].attachment == DRI2BufferDepth)
> + pDepthPixmap = private->pPixmap;
> +
> (*pScreen->DestroyPixmap)(private->pPixmap);
> }
>
>
> --
> Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>