Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Issue 1646543004: Refactor away SVGPathSource (Closed)

Created:
4 years, 10 months ago by fs
Modified:
4 years, 10 months ago
Reviewers:
pdr., f(malita)
CC:
fs, darktears, blink-reviews, blink-reviews-animation_chromium.org, chromium-reviews, krit, Eric Willigers, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor away SVGPathSource This CL moves the SVGPathParser::initialCommandIsMoveTo functionality into the path data sources that needs this check - eliminating the need for the SVGPathSource method peekSegmentType. This leaves SVGPathParser::parsePath as a fairly trivial loop doing parseSegment + emitSegment. Converting this function to a templated one, The remaining two methods of the SVGPathSource interface no longer need to be (called) virtual(ly) - allowing us too remove the interface entirely, and simplify and inline code (hasMoreData) accordingly. The net effect on (binary) code size is a roughtly 1.5k reduction. Also rename and refactor some of the helpers in SVGPathStringSource.cpp to try to better illustrate what they are used for. BUG=467592 Committed: https://crrev.com/848766c79ce487bc33acea38eb7c6b0cc821e6a7 Cr-Commit-Position: refs/heads/master@{#372329}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use namespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -193 lines) Patch
M third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h View 3 chunks +7 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathBlender.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathBlender.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathByteStreamBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathByteStreamSource.h View 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathByteStreamSource.cpp View 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathParser.h View 1 1 chunk +12 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathParser.cpp View 1 chunk +0 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathParserTest.cpp View 2 chunks +2 lines, -4 lines 0 comments Download
D third_party/WebKit/Source/core/svg/SVGPathSource.h View 1 chunk +0 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathStringBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathStringSource.h View 1 chunk +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathStringSource.cpp View 4 chunks +38 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp View 4 chunks +4 lines, -8 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
fs
4 years, 10 months ago (2016-01-28 15:17:06 UTC) #2
f(malita)
Nice, LGTM! https://codereview.chromium.org/1646543004/diff/1/third_party/WebKit/Source/core/svg/SVGPathParser.h File third_party/WebKit/Source/core/svg/SVGPathParser.h (right): https://codereview.chromium.org/1646543004/diff/1/third_party/WebKit/Source/core/svg/SVGPathParser.h#newcode35 third_party/WebKit/Source/core/svg/SVGPathParser.h:35: class CORE_EXPORT SVGPathParser { Nit: class -> ...
4 years, 10 months ago (2016-01-28 16:34:06 UTC) #3
fs
https://codereview.chromium.org/1646543004/diff/1/third_party/WebKit/Source/core/svg/SVGPathParser.h File third_party/WebKit/Source/core/svg/SVGPathParser.h (right): https://codereview.chromium.org/1646543004/diff/1/third_party/WebKit/Source/core/svg/SVGPathParser.h#newcode35 third_party/WebKit/Source/core/svg/SVGPathParser.h:35: class CORE_EXPORT SVGPathParser { On 2016/01/28 at 16:34:06, f(malita) ...
4 years, 10 months ago (2016-01-28 19:09:37 UTC) #4
pdr.
LGTM On 2016/01/28 at 19:09:37, fs wrote: > https://codereview.chromium.org/1646543004/diff/1/third_party/WebKit/Source/core/svg/SVGPathParser.h > File third_party/WebKit/Source/core/svg/SVGPathParser.h (right): > > ...
4 years, 10 months ago (2016-01-28 19:49:51 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1646543004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1646543004/20001
4 years, 10 months ago (2016-01-29 11:23:06 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-01-29 11:28:27 UTC) #9
commit-bot: I haz the power
4 years, 10 months ago (2016-01-29 11:29:35 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/848766c79ce487bc33acea38eb7c6b0cc821e6a7
Cr-Commit-Position: refs/heads/master@{#372329}

Powered by Google App Engine
This is Rietveld 408576698