WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 68588
[CG] ImageBufferData::getData has an invariant comparison in the inner part of a loop which doesn't get optimized out
https://bugs.webkit.org/show_bug.cgi?id=68588
Summary
[CG] ImageBufferData::getData has an invariant comparison in the inner part o...
Tim Horton
Reported
2011-09-21 17:23:57 PDT
The test of "unmultiplied" inside the inner loop of ImageBufferData::getData is unnecessary; unmultiplied won't change during the course of this calculation. I would have expected this to be optimized out by the compiler, but this patch provides a consistent and reproducible 1.7x speedup (visible with Instruments) in ImageBufferData::getData in the not-unmultiplied case with the attached test case (requires filters to be turned on).
Attachments
"repro"
(732 bytes, image/svg+xml)
2011-09-21 17:29 PDT
,
Tim Horton
no flags
Details
patch
(5.32 KB, patch)
2011-09-21 17:29 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
style fix
(5.30 KB, patch)
2011-09-21 17:35 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch
(5.71 KB, patch)
2011-09-21 18:07 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2011-09-21 17:24:24 PDT
<
rdar://problem/10164955
>
Tim Horton
Comment 2
2011-09-21 17:29:11 PDT
Created
attachment 108257
[details]
"repro"
Tim Horton
Comment 3
2011-09-21 17:29:39 PDT
Created
attachment 108259
[details]
patch
WebKit Review Bot
Comment 4
2011-09-21 17:32:31 PDT
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.
Tim Horton
Comment 5
2011-09-21 17:35:42 PDT
Created
attachment 108260
[details]
style fix
Tim Horton
Comment 6
2011-09-21 17:36:11 PDT
I should note that I was testing this on a release build.
Tim Horton
Comment 7
2011-09-21 18:07:49 PDT
Created
attachment 108263
[details]
patch Mark noted that with this patch, I'm not assigning any data in the case of 0 alpha. Fixed.
Simon Fraser (smfr)
Comment 8
2011-09-21 18:38:51 PDT
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?
WebKit Review Bot
Comment 9
2011-09-21 19:03:36 PDT
Comment on
attachment 108263
[details]
patch Clearing flags on attachment: 108263 Committed
r95695
: <
http://trac.webkit.org/changeset/95695
>
WebKit Review Bot
Comment 10
2011-09-21 19:03:41 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