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

Issue 2785203002: Split Gradient impl into separate classes (Closed)

Created:
3 years, 8 months ago by f(malita)
Modified:
3 years, 8 months ago
CC:
fs, ajuma+watch-canvas_chromium.org, ajuma+watch_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, fmalita+watch_chromium.org, gyuyoung2, haraken, jbroman, jchaffraix+rendering, kinuko+watch, kouhei+svg_chromium.org, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+svgwatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, reed1, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Split Gradient impl into separate classes In preparation of adding a new gradient type (conic), refactor Gradient into separate, private subclasses. * more specific factory names: createLinear(), createRadial() * remove unused getters: p0(), p1(), startRadius(), endRadius(), spreadMethod(). * refactor isRadial() as a type getter. * relocate isZeroSize() to CanvasGradient (its only client). Refactor-only, no functional changes. BUG=614368 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2785203002 Cr-Commit-Position: refs/heads/master@{#461207} Committed: https://chromium.googlesource.com/chromium/src/+/fb6b69556d51265620cc759174e77484fc6c6067

Patch Set 1 #

Patch Set 2 : isZeroSize, Mac build fix #

Patch Set 3 : cleanup #

Patch Set 4 : anonymous subclasses #

Total comments: 2

Patch Set 5 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -154 lines) Patch
M third_party/WebKit/Source/core/css/CSSGradientValue.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceLinearGradient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceRadialGradient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ThemePainterMac.mm View 1 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp View 1 chunk +15 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasGradient.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasGradient.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Gradient.h View 1 2 3 4 3 chunks +32 lines, -47 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Gradient.cpp View 1 2 3 4 5 chunks +126 lines, -81 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (26 generated)
f(malita)
3 years, 8 months ago (2017-03-30 18:10:05 UTC) #17
fs
LGTM (% modules/canvas2d/ which I don't own.) https://codereview.chromium.org/2785203002/diff/60001/third_party/WebKit/Source/platform/graphics/Gradient.h File third_party/WebKit/Source/platform/graphics/Gradient.h (right): https://codereview.chromium.org/2785203002/diff/60001/third_party/WebKit/Source/platform/graphics/Gradient.h#newcode76 third_party/WebKit/Source/platform/graphics/Gradient.h:76: virtual ~Gradient() ...
3 years, 8 months ago (2017-03-30 21:31:52 UTC) #19
f(malita)
https://codereview.chromium.org/2785203002/diff/60001/third_party/WebKit/Source/platform/graphics/Gradient.h File third_party/WebKit/Source/platform/graphics/Gradient.h (right): https://codereview.chromium.org/2785203002/diff/60001/third_party/WebKit/Source/platform/graphics/Gradient.h#newcode76 third_party/WebKit/Source/platform/graphics/Gradient.h:76: virtual ~Gradient() = default; On 2017/03/30 21:31:52, fs wrote: ...
3 years, 8 months ago (2017-03-31 13:39:23 UTC) #22
f(malita)
junov/senorblanco: PTAL at the C2D bits. Thanks!
3 years, 8 months ago (2017-03-31 17:07:53 UTC) #26
Stephen White
Looks great. Awesome that you removed the duplicated data (p0, p1, etc) from the Gradient ...
3 years, 8 months ago (2017-03-31 19:46:38 UTC) #27
Justin Novosad
Me likes. lgtm
3 years, 8 months ago (2017-03-31 20:15:04 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2785203002/80001
3 years, 8 months ago (2017-03-31 20:17:44 UTC) #31
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 20:24:13 UTC) #34
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/fb6b69556d51265620cc759174e7...

Powered by Google App Engine
This is Rietveld 408576698