Summary: | [CG] ImageBufferData::getData has an invariant comparison in the inner part of a loop which doesn't get optimized out | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||||
Component: | Layout and Rendering | Assignee: | Tim Horton <thorton> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | simon.fraser, webkit-bug-importer, webkit.review.bot | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Tim Horton
2011-09-21 17:23:57 PDT
Created attachment 108257 [details]
"repro"
Created attachment 108259 [details]
patch
Attachment 108259 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp:195: One line control clauses should not use braces. [whitespace/braces] [4]
Total errors found: 1 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 108260 [details]
style fix
I should note that I was testing this on a release build. Created attachment 108263 [details]
patch
Mark noted that with this patch, I'm not assigning any data in the case of 0 alpha. Fixed.
Comment on attachment 108263 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=108263&action=review This code grows more and more unwieldy with each change. > Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp:195 > + reinterpret_cast<uint32_t*>(destRows + x)[0] = reinterpret_cast<uint32_t*>(srcRows + x)[0]; Can this be a memcpy? Comment on attachment 108263 [details] patch Clearing flags on attachment: 108263 Committed r95695: <http://trac.webkit.org/changeset/95695> All reviewed patches have been landed. Closing bug. |