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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 12 10:01:48 PST 2013


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





--- Comment #7 from Hin-Chung Lam <hclam at google.com>  2013-02-12 10:04:02 PST ---
(From update of attachment 186672)
View in context: https://bugs.webkit.org/attachment.cgi?id=186672&action=review

>>>>> Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.cpp:213
>>>>> +    bool hasAlpha = (*decoder)->frameHasAlphaAtIndex(0);
>>>> 
>>>> Do something like:
>>>> 
>>>> m_hasAlpha = isComplete && !fullSizeBitmap.isOpaque();
>>> 
>>> hmm.... if isComplete is false, shouldn't we return true there to force image decoding?
>> 
>> I don't know what you mean.
>> 
>> Actually now I think about it again you can just do !fullSizeBitmap.isOpaque(). Don't call frameHasAlphaAtIndex(0) it might have side effect.
> 
> Yes, I think !fullSizeBitmap.isOpaque() should be correct.
> hasAlpha should be defaulted to true. So if isComplete is false, we should use true so that there are no optimization happening elsewhere.

isOpaque() is default to false, it is set to true only if decoder tells it to. So it's more accurate than mixing it with isComplete. For example progressive JPEG, an image can be partially decoded (i.e. isComplete == false) but it is opaque.

-- 
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