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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 11 15:56:09 PST 2013


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





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

You don't need to change LazyDecodingPixel or ScaledImageFragment.

Save the alpha state in ImageFrameGenerator instead. You will have to lock it when accessing this field.

> Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.cpp:185
> +        LazyDecodingPixelRef* pixelRef = static_cast<LazyDecodingPixelRef*>(m_lazyDecodedFrame.getSkBitmap().pixelRef());

alpha state should be saved in ImageFrameGenerator.

ImageFrameGenerator corresponds to one image file. It exists regardless whether or not an image is cached or not. So in the case of ScaledImageFragment being evicted the code can return the correct alpha state regardless of whether it is cached or not.

> Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.cpp:213
> +    bool hasAlpha = (*decoder)->frameHasAlphaAtIndex(0);

Do something like:

m_hasAlpha = isComplete && !fullSizeBitmap.isOpaque();

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