On Mon, Dec 20, 2010 at 10:16:22AM -0800, ext Keith Packard wrote:
> On Mon, 20 Dec 2010 18:05:42 +0200, [email protected] wrote:
> 
> > -void
> > +PixmapPtr
> >  compFreePixmap (WindowPtr pWin)
> >  {
> >      ScreenPtr          pScreen = pWin->drawable.pScreen;
> > @@ -612,7 +647,8 @@ compFreePixmap (WindowPtr pWin)
> >      pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent);
> >      pWin->redirectDraw = RedirectDrawNone;
> >      compSetPixmap (pWin, pParentPixmap);
> > -    (*pScreen->DestroyPixmap) (pRedirectPixmap);
> > +
> > +    return pRedirectPixmap;
> >  }
> 
> This doesn't free the pixmap anymore, so it needs to be renamed, perhaps
> to compSetParentPixmap? Also, it shouldn't be returning the pixmap,
> instead it should remain a void function and the caller should be
> responsible for fetching the pixmap beforehand and freeing afterwards.

OK. I'll adjust the patch accordingly.

> Alternatively, (and I think this is uglier), compCheckRedirect could
> bump the pixmap ref count before calling compFreePixmap and then destroy
> the pixmap after copying the bits.
> 
> 
> -- 
> [email protected]



-- 
Ville Syrjälä
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to