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

Issue 1033643003: Rework SVG path normalization code (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, f(malita), gyuyoung.kim_webkit.org, Stephen Chennney, pdr+svgwatchlist_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Rework SVG path normalization code This CL moves normalization code from the SVGPathParser::emit* methods, into a emitSegment method on a new helper object NormalizingConsumer. Normalization is a fairly uniform process, and with a more uniform datastructure to work on (PathSegmentData), it can be simplified. The new NormalizingConsumer::emitSegment accepts a non-normalized segment, which it maps to a normalized segment in a few steps: 1) Convert relative points to absolute. 2) Convert smooth/quadratic/arc parametrizations to cubics. 3) Convert non-normalized verbs to normalized. 4) Update normalization state. Normalization state (currentPoint, subPathPoint, etc.) is also moved to the new helper class. The coordinate mode (SVGPathParser::m_mode) is no longer needed and removed. The checks for quadratic/cubic curve classes are turned into functions. BUG=467592 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192445

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -185 lines) Patch
M Source/core/svg/SVGPathParser.h View 1 chunk +0 lines, -15 lines 0 comments Download
M Source/core/svg/SVGPathParser.cpp View 5 chunks +149 lines, -170 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
fs
5 years, 9 months ago (2015-03-24 13:57:06 UTC) #2
Stephen Chennney
lgtm
5 years, 9 months ago (2015-03-24 15:33:39 UTC) #3
kouhei (in TOK)
lgtm
5 years, 9 months ago (2015-03-24 16:16:38 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643003/1
5 years, 9 months ago (2015-03-24 16:20:24 UTC) #6
commit-bot: I haz the power
5 years, 9 months ago (2015-03-24 16:24:11 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192445

Powered by Google App Engine
This is Rietveld 408576698