Bug 51105

Summary: Improve 'arithmetic' operator on feComposite
Product: WebKit Reporter: Zoltan Herczeg <zherczeg>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, krit, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch
none
alternative patch
none
patch
none
style patch none

Description Zoltan Herczeg 2010-12-15 06:17:30 PST
Improve arithmetic mode using the new result passing method
Comment 1 Zoltan Herczeg 2010-12-15 06:24:22 PST
Created attachment 76641 [details]
patch
Comment 2 WebKit Review Bot 2010-12-15 06:26:23 PST
Attachment 76641 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebCore/ChangeLog', u'WebCore/platform/graphics/filters/FEComposite.cpp']" exit_code: 1
WebCore/platform/graphics/filters/FEComposite.cpp:120:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/filters/FEComposite.cpp:121:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/filters/FEComposite.cpp:144:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 3 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Zoltan Herczeg 2010-12-15 06:53:24 PST
Created attachment 76642 [details]
alternative patch
Comment 4 WebKit Review Bot 2010-12-15 06:55:30 PST
Attachment 76642 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebCore/ChangeLog', u'WebCore/platform/graphics/filters/FEComposite.cpp']" exit_code: 1
WebCore/platform/graphics/filters/FEComposite.cpp:120:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/filters/FEComposite.cpp:121:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/filters/FEComposite.cpp:144:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 3 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Zoltan Herczeg 2010-12-15 07:02:52 PST
Created attachment 76643 [details]
patch

Wrong patch before... sry
Comment 6 WebKit Review Bot 2010-12-15 07:04:07 PST
Attachment 76643 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebCore/ChangeLog', u'WebCore/platform/graphics/filters/FEComposite.cpp']" exit_code: 1
WebCore/platform/graphics/filters/FEComposite.cpp:145:  Missing space after ,  [whitespace/comma] [3]
WebCore/platform/graphics/filters/FEComposite.cpp:149:  Missing space after ,  [whitespace/comma] [3]
WebCore/platform/graphics/filters/FEComposite.cpp:154:  Missing space after ,  [whitespace/comma] [3]
WebCore/platform/graphics/filters/FEComposite.cpp:157:  Missing space after ,  [whitespace/comma] [3]
Total errors found: 4 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Dirk Schulze 2010-12-15 09:12:25 PST
Comment on attachment 76643 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=76643&action=review

The code looks good. It's just sad, that you check m_type twice, but I also don't see another way without code duplication :-/ r=me

Just one note, "feArithmeticFilter" is not the best choice. "Improve 'arithmetic' operator on feComposite" or something like that. And plese fix the style issues.

> WebCore/ChangeLog:12
> +        The existing tests cover this feature.

How, since you didn't change the behavior but just the performance?!? ;-)
Comment 8 Zoltan Herczeg 2010-12-16 00:36:06 PST
Landed in https://bugs.webkit.org/show_bug.cgi?id=51105

(Measured the perf gain, and realized that there are some non-visible changes (rounding changes) on some dynamic-tests, and added them to the patch)
Comment 9 Dirk Schulze 2010-12-16 00:39:25 PST
(In reply to comment #8)
> Landed in https://bugs.webkit.org/show_bug.cgi?id=51105
> 
> (Measured the perf gain, and realized that there are some non-visible changes (rounding changes) on some dynamic-tests, and added them to the patch)

You added the wrong link and didn't clear the review flag.
Comment 10 Zoltan Herczeg 2010-12-16 00:49:22 PST
sorry.

http://trac.webkit.org/changeset/74177
Comment 11 Zoltan Herczeg 2010-12-16 03:53:21 PST
Created attachment 76750 [details]
style patch
Comment 12 Zoltan Herczeg 2010-12-16 03:53:47 PST
style bugs
Comment 13 WebKit Commit Bot 2010-12-16 05:21:40 PST
Comment on attachment 76750 [details]
style patch

Rejecting attachment 76750 [details] from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-3', 'apply-attachment', '--non-interactive', 76750]" exit_code: 2
Last 500 characters of output:
ailed to merge in the changes.
Patch failed at 0001 2010-12-16  Yury Semikhatsky  <yurys@chromium.org>

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

rebase refs/remotes/origin/master: command returned error: 1

Died at WebKitTools/Scripts/update-webkit line 132.

Failed to run "['WebKitTools/Scripts/update-webkit']" exit_code: 2

Full output: http://queues.webkit.org/results/7191060
Comment 14 WebKit Review Bot 2010-12-16 15:38:15 PST
http://trac.webkit.org/changeset/74177 might have broken Leopard Intel Debug (Tests)
Comment 15 WebKit Commit Bot 2010-12-17 18:32:38 PST
Comment on attachment 76750 [details]
style patch

Clearing flags on attachment: 76750

Committed r74310: <http://trac.webkit.org/changeset/74310>
Comment 16 WebKit Commit Bot 2010-12-17 18:32:45 PST
All reviewed patches have been landed.  Closing bug.