[Webkit-unassigned] [Bug 21322] DumpRenderTree pixel test improvements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 23 13:39:15 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=21322





------- Comment #32 from aroben at apple.com  2008-10-23 13:39 PDT -------
(In reply to comment #31)
> (In reply to comment #29)
> > > I believe you're leaking the CGContext here. BitmapContext retains the context
> > > you pass in, so you need to call CGContextRelease to balance the
> > > CGBitmapContextCreate.
> > 
> > Dan has pointed out to me that BitmapContext's constructor adopts the
> > CGContext. I think that is quite confusing (as he said in comment 21). I think
> > it would be clearer to get rid of the adoption in the constructor and just add
> > a release at the callsites.
> 
> You cannot do this because the CGBitmapContext does not retain its backing,
> which is also different on Mac vs Windows. That's why we had to create this
> wrapper class that owns the context and the backing.

I don't think I understand why retaining is not possible when adopting is
possible.

All I'm suggesting is that the BitmapContext constructor retain the passed-in
CGContext, where today it adopts it.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list