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

Issue 2007553002: Retire setGradientSpaceTransform, setPatternSpaceTransform (Closed)

Created:
4 years, 7 months ago by f(malita)
Modified:
4 years, 6 months ago
CC:
ajuma+watch_chromium.org, ajuma+watch-canvas_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, gyuyoung2, haraken, jbroman, jchaffraix+rendering, kinuko+watch, kouhei+svg_chromium.org, leviw+renderwatch, pdr+svgwatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, pdr+graphicswatchlist_chromium.org, reed1, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Retire setGradientSpaceTransform, setPatternSpaceTransform Most gradient/pattern clients always reset the transform before applying to a paint, while few (CanvasPattern) actually rely on the transform state being persistent. This yields confusing semantics where it's unclear whether it is safe to whack the state. The CL removes the transform from the gradient/pattern state, and makes it an argument to applyToPaint(). This simplifies the gradient/pattern impl and clarifies that clients are responsible for tracking the local matrix. The local matrix is still used as part of the shader cache key - but since SkShaders already track their local matrix, there is no need for explicit tracking in Gradient/Pattern. R=fs@opera.com,junov@chromium.org BUG=614368 Committed: https://crrev.com/32296b3b4ae6c39f1add59880f90da075b9e104b Cr-Commit-Position: refs/heads/master@{#396557}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : rebase #

Patch Set 4 : rebase + expectations #

Patch Set 5 : more expectations #

Total comments: 2

Patch Set 6 : review #

Total comments: 5

Patch Set 7 : pass SkMatrix& to applyToPaint #

Patch Set 8 : fmalita discovers SkMatrix::I() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -108 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceGradient.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.h View 1 3 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp View 1 2 3 4 5 6 3 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ThemePainterMac.mm View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasPattern.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasPattern.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Gradient.h View 1 2 3 4 5 6 3 chunks +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Gradient.cpp View 1 2 3 4 5 6 7 chunks +22 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImagePattern.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImagePattern.cpp View 1 2 3 4 5 6 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Pattern.h View 1 2 3 4 5 6 3 chunks +4 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Pattern.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PicturePattern.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/PicturePattern.cpp View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 26 (12 generated)
f(malita)
3 trivial rebaselines (1-2 pixel diffs), most likely due to matrix precision differences: https://storage.googleapis.com/chromium-layout-test-archives/linux_chromium_rel_ng/234062/layout-test-results/results.html
4 years, 7 months ago (2016-05-24 17:15:10 UTC) #6
fs
This WFM. core/layout/svg LGTM (platform/ non-owner LGTM.) https://codereview.chromium.org/2007553002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp (right): https://codereview.chromium.org/2007553002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp#newcode127 third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp:127: break; Nit: ...
4 years, 7 months ago (2016-05-24 18:32:03 UTC) #7
f(malita)
https://codereview.chromium.org/2007553002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp (right): https://codereview.chromium.org/2007553002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp#newcode127 third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp:127: break; On 2016/05/24 18:32:03, fs wrote: > Nit: Exchange ...
4 years, 7 months ago (2016-05-24 18:42:27 UTC) #8
f(malita)
senorblanco and/or junov - can you take a look at the canvas & platform/graphics bits? ...
4 years, 6 months ago (2016-05-26 19:57:47 UTC) #11
Stephen White
Looks good, but I'll leave for Justin to take a look. https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp File third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp (right): ...
4 years, 6 months ago (2016-05-26 20:36:26 UTC) #12
fs
https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp File third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp (right): https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp#newcode70 third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp:70: m_transform = transform * m_transform; On 2016/05/26 at 20:36:26, ...
4 years, 6 months ago (2016-05-26 21:35:44 UTC) #13
Stephen White
https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp File third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp (right): https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp#newcode70 third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp:70: m_transform = transform * m_transform; On 2016/05/26 21:35:43, fs ...
4 years, 6 months ago (2016-05-26 21:38:28 UTC) #14
Justin Novosad
lgtm
4 years, 6 months ago (2016-05-27 15:02:45 UTC) #15
f(malita)
https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/platform/graphics/Gradient.h File third_party/WebKit/Source/platform/graphics/Gradient.h (right): https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/platform/graphics/Gradient.h#newcode123 third_party/WebKit/Source/platform/graphics/Gradient.h:123: sk_sp<SkShader> createShader(const SkMatrix* localMatrix); On 2016/05/26 20:36:26, Stephen White ...
4 years, 6 months ago (2016-05-27 15:18:40 UTC) #17
fs
On 2016/05/27 at 15:18:40, fmalita wrote: > https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/platform/graphics/Gradient.h > File third_party/WebKit/Source/platform/graphics/Gradient.h (right): > > https://codereview.chromium.org/2007553002/diff/100001/third_party/WebKit/Source/platform/graphics/Gradient.h#newcode123 ...
4 years, 6 months ago (2016-05-27 15:30:57 UTC) #18
f(malita)
On 2016/05/27 15:30:57, fs wrote: > On 2016/05/27 at 15:18:40, fmalita wrote: > > > ...
4 years, 6 months ago (2016-05-27 15:37:59 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007553002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007553002/140001
4 years, 6 months ago (2016-05-27 21:02:57 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 6 months ago (2016-05-27 21:07:18 UTC) #24
commit-bot: I haz the power
4 years, 6 months ago (2016-05-27 21:08:58 UTC) #26
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/32296b3b4ae6c39f1add59880f90da075b9e104b
Cr-Commit-Position: refs/heads/master@{#396557}

Powered by Google App Engine
This is Rietveld 408576698