[Webkit-unassigned] [Bug 108892] Passing alpha to DeferredImageDecoder once decoding completes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 14 11:24:58 PST 2013


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





--- Comment #28 from Hin-Chung Lam <hclam at google.com>  2013-02-14 11:27:14 PST ---
(In reply to comment #27)
> (In reply to comment #26)
> > (In reply to comment #25)
> > > (In reply to comment #24)
> > > > If there's some chance the mutex isn't necessary, I wish we hadn't landed this.
> > > 
> > > 
> > > I am wondering whether there will be a case that:
> > > if (decoder->frameHasAlphaAtIndex(0)) {
> > >   read_pixelref();  
> > > }
> > > However, on another thread where alpha value just got set, the skbitmap still haven't been fully decoded yet. So we need a memory barrier there and Mutex should do that.
> > 
> > That will not be the case. alpha value is known only after an image is fully decoded.
> 
> Would multi processor cache hurt?

I don't know what this means.

But reading Stephen's comments that get me thinking that mutex might not be necessary. The value is either true or false and it doesn't hurt to have alpha == true. So even if we don't protect it and assignment comes while decode() is running the worst case is alpha is true when it should be false, which is benign anyway.

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


More information about the webkit-unassigned mailing list