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

Issue 1789063005: Add sk_sp helpers and switch Blink SkShader clients to the new APIs (Closed)

Created:
4 years, 9 months ago by f(malita)
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, fs, gyuyoung2, jchaffraix+rendering, Justin Novosad, kinuko+watch, kouhei+svg_chromium.org, leviw+renderwatch, pdr+svgwatchlist_chromium.org, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, 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

Add sk_sp helpers and switch Blink SkShader clients to the new APIs Introduce Skia utilities to support PassRefPtr <-> sk_sp interoperability: * fromSkSp(sk_sp<T>) - for adopting sk_sps into PassRefPtr (when transferring ownership from Skia->Blink) * toSkSp(PassRefPtr<T>) - for releasing PassRefPtr into sk_sp (when transferring ownership from Blink->Skia) * toSkSp(const RefPtr<T>&) - for creating a new sk_sp ref (when sharing ownership with Skia) Update clients to use the new Skia shader factories ("makers" vs. prev "creators"), and sk_sp-based setters. A tangential change: deconstify SkPicture fields/args to align with the new Skia APIs (SkPicture is inherently const - no non-cost methods - and Skia now expects non-const SkPicture args). BUG=skia:5077 R=jbroman@chromium.org,reed@google.com,senorblanco@chromium.org Committed: https://crrev.com/2df3d4433fc756f1297c4e0ced6524cbfcba9571 Cr-Commit-Position: refs/heads/master@{#381563} Committed: https://crrev.com/09fd8033ec57166b9f7a24903bef368fd3da8206 Cr-Commit-Position: refs/heads/master@{#381971}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : comments #

Patch Set 4 : minor cleanup #

Total comments: 7

Patch Set 5 : review #

Patch Set 6 : remove rval refs from comments #

Total comments: 2

Patch Set 7 : drop unneeded adoptSkSp type arg #

Patch Set 8 : non-oilpan MSVC compile fix #

Patch Set 9 : adoptSkSp/releaseSkSp #

Patch Set 10 : adoptSkSp/toSkSp #

Total comments: 8

Patch Set 11 : review comments #

Patch Set 12 : fromSkSp, review comments #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -42 lines) Patch
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp View 1 chunk +2 lines, -2 lines 2 comments Download
M third_party/WebKit/Source/platform/graphics/Gradient.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -5 lines 2 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsContext.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp View 2 chunks +4 lines, -5 lines 1 comment Download
M third_party/WebKit/Source/platform/graphics/Image.cpp View 3 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImagePattern.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Pattern.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/Pattern.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PicturePattern.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PicturePattern.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +78 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (21 generated)
f(malita)
Alternative approach to sk_sps in Blink: rather than using the new smart pointer type directly ...
4 years, 9 months ago (2016-03-16 14:06:45 UTC) #9
jbroman
I'm a little uneasy about the name "adoptRef" because I have such strong associations with ...
4 years, 9 months ago (2016-03-16 14:43:08 UTC) #11
f(malita)
On 2016/03/16 14:43:08, jbroman wrote: > I'm a little uneasy about the name "adoptRef" because ...
4 years, 9 months ago (2016-03-16 16:51:45 UTC) #12
jbroman
lgtm https://codereview.chromium.org/1789063005/diff/100001/third_party/WebKit/Source/platform/graphics/Gradient.cpp File third_party/WebKit/Source/platform/graphics/Gradient.cpp (right): https://codereview.chromium.org/1789063005/diff/100001/third_party/WebKit/Source/platform/graphics/Gradient.cpp#newcode259 third_party/WebKit/Source/platform/graphics/Gradient.cpp:259: paint.setShader(adoptSkSp<SkShader>(refShader())); Does this not work without the explicit ...
4 years, 9 months ago (2016-03-16 17:47:02 UTC) #14
danakj
https://codereview.chromium.org/1789063005/diff/60001/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h File third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h (right): https://codereview.chromium.org/1789063005/diff/60001/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h#newcode199 third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h:199: template <typename T> PassRefPtr<T> adoptRef(sk_sp<T>&& sp) On 2016/03/16 16:51:45, ...
4 years, 9 months ago (2016-03-16 17:54:53 UTC) #15
f(malita)
On 2016/03/16 17:54:53, danakj wrote: > > (google style guide also says not to do ...
4 years, 9 months ago (2016-03-16 18:17:43 UTC) #16
jbroman
On 2016/03/16 at 18:17:43, fmalita wrote: > On 2016/03/16 17:54:53, danakj wrote: > > > ...
4 years, 9 months ago (2016-03-16 18:20:46 UTC) #17
jbroman
On 2016/03/16 at 18:20:46, jbroman wrote: > On 2016/03/16 at 18:17:43, fmalita wrote: > > ...
4 years, 9 months ago (2016-03-16 18:22:25 UTC) #18
jbroman
On 2016/03/16 at 18:20:46, jbroman wrote: > On 2016/03/16 at 18:17:43, fmalita wrote: > > ...
4 years, 9 months ago (2016-03-16 18:25:12 UTC) #19
danakj
On Wed, Mar 16, 2016 at 11:25 AM, <jbroman@chromium.org> wrote: > On 2016/03/16 at 18:20:46, ...
4 years, 9 months ago (2016-03-16 18:34:34 UTC) #20
danakj
On Wed, Mar 16, 2016 at 11:25 AM, <jbroman@chromium.org> wrote: > On 2016/03/16 at 18:20:46, ...
4 years, 9 months ago (2016-03-16 18:42:21 UTC) #21
reed1
lgtm
4 years, 9 months ago (2016-03-16 19:39:17 UTC) #22
f(malita)
On 2016/03/16 18:25:12, jbroman wrote: > On 2016/03/16 at 18:20:46, jbroman wrote: > > We ...
4 years, 9 months ago (2016-03-16 19:50:48 UTC) #23
danakj
On Wed, Mar 16, 2016 at 12:50 PM, <fmalita@chromium.org> wrote: > On 2016/03/16 18:25:12, jbroman ...
4 years, 9 months ago (2016-03-16 19:52:07 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789063005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789063005/120001
4 years, 9 months ago (2016-03-16 19:52:28 UTC) #27
danakj
On Wed, Mar 16, 2016 at 12:50 PM, <fmalita@chromium.org> wrote: > On 2016/03/16 18:25:12, jbroman ...
4 years, 9 months ago (2016-03-16 19:58:22 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 9 months ago (2016-03-16 22:10:55 UTC) #30
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/2df3d4433fc756f1297c4e0ced6524cbfcba9571 Cr-Commit-Position: refs/heads/master@{#381563}
4 years, 9 months ago (2016-03-16 22:14:28 UTC) #32
fgorski
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1814473003/ by fgorski@chromium.org. ...
4 years, 9 months ago (2016-03-16 23:11:38 UTC) #33
f(malita)
Non-Oilpan MSVC-only build borkage: FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs_files\a3796183a9fc4d22a687c5212b9c76dbd136d70d\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes ...
4 years, 9 months ago (2016-03-17 14:12:50 UTC) #35
jbroman
On 2016/03/17 at 14:12:50, fmalita wrote: > Non-Oilpan MSVC-only build borkage: > > FAILED: ninja ...
4 years, 9 months ago (2016-03-17 14:24:26 UTC) #36
f(malita)
On 2016/03/17 14:24:26, jbroman wrote: > I'm not thrilled with reopening WTF in Source/platform/. How ...
4 years, 9 months ago (2016-03-17 17:05:43 UTC) #37
jbroman
lgtm Please also update the CL description and confirm that the latest patchset fixes the ...
4 years, 9 months ago (2016-03-17 17:19:13 UTC) #38
Stephen White
https://codereview.chromium.org/1789063005/diff/180001/third_party/WebKit/Source/platform/graphics/Gradient.h File third_party/WebKit/Source/platform/graphics/Gradient.h (right): https://codereview.chromium.org/1789063005/diff/180001/third_party/WebKit/Source/platform/graphics/Gradient.h#newcode129 third_party/WebKit/Source/platform/graphics/Gradient.h:129: PassRefPtr<SkShader> refShader(); On 2016/03/17 17:19:13, jbroman wrote: > nit: ...
4 years, 9 months ago (2016-03-17 17:50:40 UTC) #40
f(malita)
https://codereview.chromium.org/1789063005/diff/180001/third_party/WebKit/Source/platform/graphics/Gradient.h File third_party/WebKit/Source/platform/graphics/Gradient.h (right): https://codereview.chromium.org/1789063005/diff/180001/third_party/WebKit/Source/platform/graphics/Gradient.h#newcode129 third_party/WebKit/Source/platform/graphics/Gradient.h:129: PassRefPtr<SkShader> refShader(); On 2016/03/17 17:19:13, jbroman wrote: > nit: ...
4 years, 9 months ago (2016-03-17 18:04:42 UTC) #42
f(malita)
PTAL
4 years, 9 months ago (2016-03-18 12:37:17 UTC) #43
jbroman
still lgtm
4 years, 9 months ago (2016-03-18 14:18:48 UTC) #44
Stephen White
Still LGTM too. https://codereview.chromium.org/1789063005/diff/220001/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp File third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp (right): https://codereview.chromium.org/1789063005/diff/220001/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp#newcode57 third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp:57: RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture.release()); Out of ...
4 years, 9 months ago (2016-03-18 14:48:27 UTC) #45
reed1
On 2016/03/18 14:48:27, Stephen White wrote: > Still LGTM too. > > https://codereview.chromium.org/1789063005/diff/220001/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp > File ...
4 years, 9 months ago (2016-03-18 14:58:15 UTC) #46
f(malita)
https://codereview.chromium.org/1789063005/diff/220001/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp File third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp (right): https://codereview.chromium.org/1789063005/diff/220001/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp#newcode57 third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp:57: RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture.release()); On 2016/03/18 14:48:27, Stephen White ...
4 years, 9 months ago (2016-03-18 15:11:53 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789063005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789063005/220001
4 years, 9 months ago (2016-03-18 15:12:54 UTC) #50
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 9 months ago (2016-03-18 15:18:07 UTC) #52
commit-bot: I haz the power
4 years, 9 months ago (2016-03-18 15:19:10 UTC) #54
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/09fd8033ec57166b9f7a24903bef368fd3da8206
Cr-Commit-Position: refs/heads/master@{#381971}

Powered by Google App Engine
This is Rietveld 408576698