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

Issue 1779833002: Switch Blink SkShader clients to sk_sp (Closed)

Created:
4 years, 9 months ago by f(malita)
Modified:
4 years, 9 months ago
CC:
chromium-reviews, krit, drott+blinkwatch_chromium.org, Rik, blink-reviews-platform-graphics_chromium.org, dshwang, kouhei+svg_chromium.org, fs, Justin Novosad, jbroman, danakj+watch_chromium.org, pdr+graphicswatchlist_chromium.org, f(malita), blink-reviews, gyuyoung2, Stephen Chennney, pdr+svgwatchlist_chromium.org, kinuko+watch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch Blink SkShader clients to sk_sp Skia is migrating its APIs to the new smart pointer type - sk_sp. Among other benefits, the new type/APIs help avoid atomic ref count churn thanks to move semantics (ownership can now be transferred into Skia). 1) convert Blink shader wrappers (Gradient, Pattern) to store sk_sp<SkShader> (instead of RefPtr<SkShader>). 2) use sk_sp factories (MakeFoo instead of CreateFoo) 3) call the sk_sp paint shader setters - setShader(sk_sp<SkShader>) instead of setShader(SkShader*). BUG=skia:5077 R=reed@google.com,schenney@chromium.org,junov@chromium.org,senorblanco@chromium.org Committed: https://crrev.com/12e75e492a66e801b464eefa9b61d1c5058c0c5c Cr-Commit-Position: refs/heads/master@{#380664}

Patch Set 1 #

Patch Set 2 #

Total comments: 8

Patch Set 3 : review comments #

Patch Set 4 : one more inlined shader #

Patch Set 5 : build fix #

Patch Set 6 : rebase after MakePictureShader constness change #

Messages

Total messages: 25 (13 generated)
f(malita)
4 years, 9 months ago (2016-03-09 19:27:27 UTC) #7
reed1
https://codereview.chromium.org/1779833002/diff/20001/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp File third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp (right): https://codereview.chromium.org/1779833002/diff/20001/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp#newcode642 third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp:642: paint.setShader(std::move(shader)); what to push this up 3 lines, and ...
4 years, 9 months ago (2016-03-09 21:09:06 UTC) #8
reed1
4 years, 9 months ago (2016-03-09 21:09:45 UTC) #9
f(malita)
https://codereview.chromium.org/1779833002/diff/20001/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp File third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp (right): https://codereview.chromium.org/1779833002/diff/20001/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp#newcode642 third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp:642: paint.setShader(std::move(shader)); On 2016/03/09 21:09:06, reed1 wrote: > what to ...
4 years, 9 months ago (2016-03-10 13:57:58 UTC) #10
reed1
definitely a fan of staged CLs, so no need to fan-out just to fix my ...
4 years, 9 months ago (2016-03-10 14:34:58 UTC) #11
f(malita)
Earlier build errors are fixed, in case other reviewers were holding out.
4 years, 9 months ago (2016-03-10 20:11:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1779833002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1779833002/80001
4 years, 9 months ago (2016-03-11 14:16:36 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/138659)
4 years, 9 months ago (2016-03-11 14:50:31 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1779833002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1779833002/100001
4 years, 9 months ago (2016-03-11 16:46:33 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-11 17:42:15 UTC) #22
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/12e75e492a66e801b464eefa9b61d1c5058c0c5c Cr-Commit-Position: refs/heads/master@{#380664}
4 years, 9 months ago (2016-03-11 17:43:45 UTC) #24
f(malita)
4 years, 9 months ago (2016-03-11 19:30:17 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/1786183002/ by fmalita@chromium.org.

The reason for reverting is: While working on follow-up CLs it became clear that
using native sk_sps in Blink fans out massively.  A better approach may be to
introduce helpers for adopting sk_sp into PassRefPtr and releasing PassRefPtr
into sk_sp - then we only need to update the Skia/Blink API boundaries without
affecting Blink's internal APIs/types.

Reverting for now to evaluate the alternative approach..

Powered by Google App Engine
This is Rietveld 408576698