[webkit-reviews] review granted: [Bug 169771] REGRESSION(213764): Large images should not be decoded asynchronously when they are drawn on a canvas : [Attachment 305522] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 27 16:50:37 PDT 2017
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 169771: REGRESSION(213764): Large images should not be decoded
asynchronously when they are drawn on a canvas
https://bugs.webkit.org/show_bug.cgi?id=169771
Attachment 305522: Patch
https://bugs.webkit.org/attachment.cgi?id=305522&action=review
--- Comment #30 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 305522
--> https://bugs.webkit.org/attachment.cgi?id=305522
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=305522&action=review
> Source/WebCore/platform/graphics/BitmapImage.cpp:173
> + if (decodingMode == DecodingMode::Asynchronous &&
shouldUseAsyncDecodingForLargeImage()) {
shouldUseAsyncDecodingForLargeImage should be
shouldUseAsyncDecodingForLargeImages
> Source/WebCore/platform/graphics/BitmapImage.cpp:176
> + // Check if a NativeImage is available for this sizeForDrawing.
Now that the function name is better, you don't need the comment.
> Source/WebCore/platform/graphics/BitmapImage.cpp:178
> + if
(!frameHasDecodedNativeImageCompatibleWithOptionsAtIndex(m_currentFrame,
m_currentSubsamplingLevel, DecodingOptions(sizeForDrawing))) {
> + if
(!frameIsBeingDecodedAndIsCompatibleWithOptionsAtIndex(m_currentFrame,
DecodingOptions(sizeForDrawing))) {
These could be tested in one if () clause.
More information about the webkit-reviews
mailing list