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

Issue 1056873002: Move SVG path blend state to its own object (Closed)

Created:
5 years, 8 months ago by fs
Modified:
5 years, 8 months ago
CC:
blink-reviews, krit, kouhei+svg_chromium.org, fs, ed+blinkwatch_opera.com, f(malita), gyuyoung2, pdr+svgwatchlist_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Move SVG path blend state to its own object Create a new inner state object SVGPathBlender::BlendState and move SVGPathBlender::blendSegments and helpers to it. The per-segment blend* methods are folded away into blendSegments(). This allows to better exploit commonalities between the different segment types. The update of the current point(s) is moved into a helper function. BUG=467592 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193262

Patch Set 1 #

Patch Set 2 : Simplify updateCurrentPoint some more. #

Total comments: 6

Patch Set 3 : Re-order declarations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -203 lines) Patch
M Source/core/svg/SVGPathBlender.h View 2 chunks +2 lines, -32 lines 0 comments Download
M Source/core/svg/SVGPathBlender.cpp View 1 2 6 chunks +144 lines, -171 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
fs
5 years, 8 months ago (2015-04-02 13:59:32 UTC) #2
Stephen Chennney
I agree this is a good refactoring of the existing code. But I have some ...
5 years, 8 months ago (2015-04-02 15:00:30 UTC) #3
fs
https://codereview.chromium.org/1056873002/diff/20001/Source/core/svg/SVGPathBlender.cpp File Source/core/svg/SVGPathBlender.cpp (right): https://codereview.chromium.org/1056873002/diff/20001/Source/core/svg/SVGPathBlender.cpp#newcode161 Source/core/svg/SVGPathBlender.cpp:161: case PathSegLineToVerticalRel: On 2015/04/02 15:00:30, Stephen Chenney wrote: > ...
5 years, 8 months ago (2015-04-02 15:08:31 UTC) #4
Stephen Chennney
LGTM. We're clearly not going to break anything that already exists.
5 years, 8 months ago (2015-04-02 15:10:43 UTC) #5
fs
https://codereview.chromium.org/1056873002/diff/20001/Source/core/svg/SVGPathBlender.cpp File Source/core/svg/SVGPathBlender.cpp (right): https://codereview.chromium.org/1056873002/diff/20001/Source/core/svg/SVGPathBlender.cpp#newcode97 Source/core/svg/SVGPathBlender.cpp:97: FloatPoint SVGPathBlender::BlendState::blendAnimatedFloatPointSameCoordinates(const FloatPoint& fromPoint, const FloatPoint& toPoint) On 2015/04/02 ...
5 years, 8 months ago (2015-04-07 08:27:29 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1056873002/40001
5 years, 8 months ago (2015-04-07 10:40:13 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=193262
5 years, 8 months ago (2015-04-07 10:43:48 UTC) #10
Stephen Chennney
5 years, 8 months ago (2015-04-07 13:48:26 UTC) #11
Message was sent while issue was closed.
On 2015/04/07 08:27:29, fs wrote:
>
https://codereview.chromium.org/1056873002/diff/20001/Source/core/svg/SVGPath...
> File Source/core/svg/SVGPathBlender.cpp (right):
> 
>
https://codereview.chromium.org/1056873002/diff/20001/Source/core/svg/SVGPath...
> Source/core/svg/SVGPathBlender.cpp:97: FloatPoint
> SVGPathBlender::BlendState::blendAnimatedFloatPointSameCoordinates(const
> FloatPoint& fromPoint, const FloatPoint& toPoint)
> On 2015/04/02 15:00:30, Stephen Chenney wrote:
> > Minor nit: Could you swap the order of this and the next to match the header
> > declaration order. And put canBlend before both.
> 
> Assuming you wanted the order of declarations and definitions to match, I did
it
> the other way around instead (i.e. reordered the declarations.) This yields a
> smaller (more obvious) diff. If you wanted the definitions to actually move
> around for another reason let me know and I'll fix that up.

Your solution was better. Thanks.

Powered by Google App Engine
This is Rietveld 408576698