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

Issue 1037463002: Rework the SVGPathConsumer interface (Closed)

Created:
5 years, 9 months ago by fs
Modified:
5 years, 9 months ago
CC:
blink-reviews, krit, kouhei+svg_chromium.org, fs, ed+blinkwatch_opera.com, gyuyoung.kim_webkit.org, Stephen Chennney, pdr+svgwatchlist_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Rework the SVGPathConsumer interface The per-command interface is replaced with a segment interface. The new interface in practice only consists of the emitSegment(const PathSegment&) method, but incrementPathSegmentCount() and continueConsuming() need to be kept around for the sake of SVGPathTraversalStateBuilder. The two users of the interface - SVGPathParser and SVGPathBlender - are converted to use the new interface. For SVGPathParser this is fairly straightforward (no additional code-changes). In SVGPathBlender, the "blend switch" is moved into a separate function and each blend* method is converted to return the blended segment instead of calling the consumer themselves. Some local variables are removed in various blend* methods, but otherwise the conversion consist of assigning blended values to a PathSegmentData, rather than feeding them to a consumer. BUG=467592 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192589

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rebase; FIXME -> TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+386 lines, -555 lines) Patch
M Source/core/svg/SVGPathBlender.h View 2 chunks +11 lines, -9 lines 0 comments Download
M Source/core/svg/SVGPathBlender.cpp View 2 chunks +118 lines, -93 lines 0 comments Download
M Source/core/svg/SVGPathBuilder.h View 2 chunks +1 line, -14 lines 0 comments Download
M Source/core/svg/SVGPathBuilder.cpp View 1 chunk +22 lines, -24 lines 0 comments Download
M Source/core/svg/SVGPathByteStreamBuilder.h View 2 chunks +3 lines, -17 lines 0 comments Download
M Source/core/svg/SVGPathByteStreamBuilder.cpp View 2 chunks +51 lines, -76 lines 0 comments Download
M Source/core/svg/SVGPathConsumer.h View 3 chunks +3 lines, -14 lines 0 comments Download
M Source/core/svg/SVGPathParser.cpp View 4 chunks +10 lines, -75 lines 0 comments Download
M Source/core/svg/SVGPathSegListBuilder.h View 2 chunks +1 line, -14 lines 0 comments Download
M Source/core/svg/SVGPathSegListBuilder.cpp View 2 chunks +66 lines, -94 lines 0 comments Download
M Source/core/svg/SVGPathStringBuilder.h View 2 chunks +1 line, -14 lines 0 comments Download
M Source/core/svg/SVGPathStringBuilder.cpp View 1 2 chunks +76 lines, -80 lines 0 comments Download
M Source/core/svg/SVGPathTraversalStateBuilder.h View 2 chunks +3 lines, -14 lines 0 comments Download
M Source/core/svg/SVGPathTraversalStateBuilder.cpp View 2 chunks +20 lines, -17 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
fs
5 years, 9 months ago (2015-03-24 22:14:54 UTC) #2
Stephen Chennney
LGTM. But please modify the FIXME to be a TODO before committing. As I understand ...
5 years, 9 months ago (2015-03-25 15:05:25 UTC) #3
f(malita)
The new approach certainly feels cleaner. LGTM % nit/perf question. https://codereview.chromium.org/1037463002/diff/1/Source/core/svg/SVGPathBlender.cpp File Source/core/svg/SVGPathBlender.cpp (right): https://codereview.chromium.org/1037463002/diff/1/Source/core/svg/SVGPathBlender.cpp#newcode213 ...
5 years, 9 months ago (2015-03-25 15:08:15 UTC) #4
fs
https://codereview.chromium.org/1037463002/diff/1/Source/core/svg/SVGPathBlender.cpp File Source/core/svg/SVGPathBlender.cpp (right): https://codereview.chromium.org/1037463002/diff/1/Source/core/svg/SVGPathBlender.cpp#newcode213 Source/core/svg/SVGPathBlender.cpp:213: blendedSegment.command = m_isInFirstHalfOfAnimation ? fromSeg.command : toSeg.command; On 2015/03/25 ...
5 years, 9 months ago (2015-03-25 17:08:14 UTC) #5
fs
https://codereview.chromium.org/1037463002/diff/1/Source/core/svg/SVGPathBlender.cpp File Source/core/svg/SVGPathBlender.cpp (right): https://codereview.chromium.org/1037463002/diff/1/Source/core/svg/SVGPathBlender.cpp#newcode277 Source/core/svg/SVGPathBlender.cpp:277: m_consumer->emitSegment(blendedSegment); On 2015/03/25 17:08:13, fs wrote: > On 2015/03/25 ...
5 years, 9 months ago (2015-03-25 17:56:11 UTC) #6
f(malita)
On 2015/03/25 17:56:11, fs wrote: > I extracted some path animations from some SVGs I ...
5 years, 9 months ago (2015-03-25 18:18:27 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1037463002/20001
5 years, 9 months ago (2015-03-26 08:40:08 UTC) #10
commit-bot: I haz the power
5 years, 9 months ago (2015-03-26 08:43:35 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192589

Powered by Google App Engine
This is Rietveld 408576698