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

Issue 678863002: Move SVG shape painting code to SVGShapePainter (Closed)

Created:
6 years, 1 month ago by pdr.
Modified:
6 years, 1 month ago
CC:
blink-reviews, blink-reviews-rendering, krit, eae+blinkwatch, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung.kim_webkit.org, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, zoltan1
Project:
blink
Visibility:
Public.

Description

Move SVG shape painting code to SVGShapePainter This patch moves all SVG shape (path,rect,ellipse,circle,polyline,line, polygon) painting code to SVGShapePainter. This megapatch is primarily a code move without changes. The two big changes are: 1) All painting code for RenderSVG{Shape,Path,Rect,Ellipse} has been moved to SVGShapePainter. The original designer of this code went OOP crazy and created a delicious spaghetti of fillShape and strokeShape. These virtual functions have been replaced with two new virtuals that are a bit easier to digest: useRectRenderingFastPath and useEllipseRenderingFastPath. 2) The marker code only applies to "markable elements"[1] and is only needed on RenderSVGPath. The marker data and functions have been moved to RenderSVGPath which shrinks RenderSVG{Rect,Ellipse} by a pointer and cleans up RenderSVGShape. [1] https://svgwg.org/svg2-draft/single-page.html#intro-TermMarkableElement BUG=412088 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184487

Patch Set 1 #

Patch Set 2 : Fix compile #

Patch Set 3 : Fix compile (2) #

Patch Set 4 : Cleanup for review #

Total comments: 10

Patch Set 5 : Update per reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+362 lines, -314 lines) Patch
M Source/core/core.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/paint/SVGShapePainter.h View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download
A Source/core/paint/SVGShapePainter.cpp View 1 2 3 4 1 chunk +204 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGEllipse.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGEllipse.cpp View 2 chunks +0 lines, -21 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGPath.h View 1 2 3 4 1 chunk +10 lines, -3 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGPath.cpp View 1 2 3 5 chunks +61 lines, -51 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGRect.h View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGRect.cpp View 1 2 3 2 chunks +1 line, -24 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGShape.h View 1 2 3 4 5 chunks +25 lines, -20 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGShape.cpp View 1 2 3 7 chunks +2 lines, -189 lines 0 comments Download
M Source/core/rendering/svg/SVGMarkerData.h View 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
pdr.
6 years, 1 month ago (2014-10-25 20:16:32 UTC) #3
chrishtr
https://codereview.chromium.org/678863002/diff/60001/Source/core/rendering/svg/RenderSVGShape.h File Source/core/rendering/svg/RenderSVGShape.h (right): https://codereview.chromium.org/678863002/diff/60001/Source/core/rendering/svg/RenderSVGShape.h#newcode62 Source/core/rendering/svg/RenderSVGShape.h:62: virtual FloatRect paintInvalidationRectInLocalCoordinates() const override final { return m_paintInvalidationBoundingBox; ...
6 years, 1 month ago (2014-10-27 03:34:12 UTC) #4
fs
LGTM w/ a suggestion and a bunch of trivial nits. https://codereview.chromium.org/678863002/diff/60001/Source/core/rendering/svg/RenderSVGPath.h File Source/core/rendering/svg/RenderSVGPath.h (right): https://codereview.chromium.org/678863002/diff/60001/Source/core/rendering/svg/RenderSVGPath.h#newcode40 ...
6 years, 1 month ago (2014-10-27 12:36:27 UTC) #5
pdr.
Thanks for the reviews! Looking forward to devirtualizing paintInvalidationRectInLocalCoordinates soon. https://codereview.chromium.org/678863002/diff/60001/Source/core/rendering/svg/RenderSVGPath.h File Source/core/rendering/svg/RenderSVGPath.h (right): https://codereview.chromium.org/678863002/diff/60001/Source/core/rendering/svg/RenderSVGPath.h#newcode40 ...
6 years, 1 month ago (2014-10-27 22:29:44 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678863002/80001
6 years, 1 month ago (2014-10-27 22:30:49 UTC) #8
commit-bot: I haz the power
6 years, 1 month ago (2014-10-28 00:12:37 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as 184487

Powered by Google App Engine
This is Rietveld 408576698