[Webkit-unassigned] [Bug 90445] Add a comment in order to clarify why BitmapImage::frameHasAlphaAtIndex returns true as default.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 3 15:54:55 PDT 2012


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





--- Comment #6 from Huang Dongsung <luxtella at company100.net>  2012-07-03 15:54:55 PST ---
(In reply to comment #4)
> (From update of attachment 150579 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=150579&action=review
> 
> > Source/WebCore/platform/graphics/BitmapImage.cpp:322
> > +    // When a frame has not finished decoding, always mark it as having alpha.
> 
> The comment was copied from ImageSource::frameHasAlphaAtIndex(size_t index)

The comment of ImageSource::frameHasAlphaAtIndex is long, so I pasted just summary of the comment to BitmapImage::frameHasAlphaAtIndex.

bool ImageSource::frameHasAlphaAtIndex(ImageFrame* buffer)
{
    // When a frame has not finished decoding, always mark it as having alpha.
    // Ports that check the result of this function to determine their
    // compositing op need this in order to not draw the undecoded portion as
    // black.
    // TODO: Perhaps we should ensure that each individual decoder returns true
    // in this case.
    return !frameIsCompleteAtIndex(buffer) || buffer->hasAlpha();
}

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