WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
90445
Add a comment in order to clarify why BitmapImage::frameHasAlphaAtIndex returns true as default.
https://bugs.webkit.org/show_bug.cgi?id=90445
Summary
Add a comment in order to clarify why BitmapImage::frameHasAlphaAtIndex retur...
Dongseong Hwang
Reported
2012-07-03 04:14:29 PDT
Add an assertion and a comment in order to clarify the states of BitmapImage.
Attachments
patch
(1.42 KB, patch)
2012-07-03 04:16 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
patch v.2
(1.84 KB, patch)
2012-07-03 04:26 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
patch v.3
(2.07 KB, patch)
2012-07-03 18:29 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dongseong Hwang
Comment 1
2012-07-03 04:16:20 PDT
Created
attachment 150577
[details]
patch
Dongseong Hwang
Comment 2
2012-07-03 04:18:14 PDT
Comment on
attachment 150577
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=150577&action=review
> Source/WebCore/platform/graphics/BitmapImage.cpp:312 > + ASSERT(m_frames[index].m_isComplete);
All case that call this method is guarded by if(isComplete).
> Source/WebCore/platform/graphics/BitmapImage.cpp:326 > + // black.
The comment was copied from ImageSource::frameHasAlphaAtIndex(size_t index)
Dongseong Hwang
Comment 3
2012-07-03 04:26:50 PDT
Created
attachment 150579
[details]
patch v.2
Dongseong Hwang
Comment 4
2012-07-03 04:27:09 PDT
Comment on
attachment 150579
[details]
patch v.2 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)
Dongseong Hwang
Comment 5
2012-07-03 05:00:56 PDT
(In reply to
comment #0
)
> Add an assertion and a comment in order to clarify the states of BitmapImage.
I removed the assertion in patch v.2 because I misunderstood at the time to patch v.1.
Dongseong Hwang
Comment 6
2012-07-03 15:54:55 PDT
(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(); }
Eric Seidel (no email)
Comment 7
2012-07-03 16:57:37 PDT
Comment on
attachment 150579
[details]
patch v.2 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(); > }
You should add a line that said: // See ImageSource::framehasAlphaAtIndex for explanation of why incomplete images claim to have alpha.
Dongseong Hwang
Comment 8
2012-07-03 18:29:04 PDT
Created
attachment 150704
[details]
patch v.3 Absolutely!
WebKit Review Bot
Comment 9
2012-07-03 22:19:44 PDT
Comment on
attachment 150704
[details]
patch v.3 Clearing flags on attachment: 150704 Committed
r121827
: <
http://trac.webkit.org/changeset/121827
>
WebKit Review Bot
Comment 10
2012-07-03 22:19:49 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug