Summary: | REGRESSION(198782): ImageSource::subsamplingLevelForScale() does not cache the MaximumSubsamplingLevel for this ImageSource | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||
Component: | Images | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, commit-queue | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 155322 | ||||||||
Attachments: |
|
Description
Said Abou-Hallawa
2016-04-19 15:43:32 PDT
The image subsampling is on by default only for iOS. So this bug currently affects the iOS port. Created attachment 276768 [details]
Patch
Comment on attachment 276768 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=276768&action=review > Source/WebCore/platform/graphics/ImageSource.cpp:132 > + if (cacheMetadata(), !m_maximumSubsamplingLevel) > return 0; This use of the comma expression is not idiomatic for WebKit. The way we would write this in WebKit coding style is: cacheMetadata(); if (!m_maximumSubsamplingLevel) > Source/WebCore/platform/graphics/ImageSource.h:122 > + size_t frameCount() { return cacheMetadata(), m_frameCount; } Ditto. Please don't format it like this. Instead I suggest writing it after the class definition like this: inline size_t ImageSource::frameCount() { cacheMetadata(); return m_frameCount; } Created attachment 276785 [details]
Patch
Comment on attachment 276768 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=276768&action=review >> Source/WebCore/platform/graphics/ImageSource.cpp:132 >> return 0; > > This use of the comma expression is not idiomatic for WebKit. The way we would write this in WebKit coding style is: > > cacheMetadata(); > if (!m_maximumSubsamplingLevel) Done. The comma expression was split into two statements. >> Source/WebCore/platform/graphics/ImageSource.h:122 >> + size_t frameCount() { return cacheMetadata(), m_frameCount; } > > Ditto. Please don't format it like this. Instead I suggest writing it after the class definition like this: > > inline size_t ImageSource::frameCount() > { > cacheMetadata(); > return m_frameCount; > } Done. The comma expression was split into two statements. Did you mean to land this? (In reply to comment #6) > Did you mean to land this? Running tests to ensure the patch really fixes an iOS regression performance. Comment on attachment 276785 [details] Patch Clearing flags on attachment: 276785 Committed r199821: <http://trac.webkit.org/changeset/199821> All reviewed patches have been landed. Closing bug. |