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

Unified Diff: src/core/SkColorFilterShader.cpp

Issue 1782703002: sk_sp versions of newWithColorFilter and newWithLocalMatrix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkLocalMatrixShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorFilterShader.cpp
diff --git a/src/core/SkColorFilterShader.cpp b/src/core/SkColorFilterShader.cpp
index f5a3b9c9e16e20e781308aa09d20d01a10f8dda1..2e426a17eded3255f99f12f562cda2b86f510691 100644
--- a/src/core/SkColorFilterShader.cpp
+++ b/src/core/SkColorFilterShader.cpp
@@ -137,10 +137,10 @@ void SkColorFilterShader::toString(SkString* str) const {
///////////////////////////////////////////////////////////////////////////////////////////////////
-SkShader* SkShader::newWithColorFilter(SkColorFilter* filter) const {
+sk_sp<SkShader> SkShader::makeWithColorFilter(SkColorFilter* filter) const {
SkShader* base = const_cast<SkShader*>(this);
if (!filter) {
- return SkRef(base);
+ return sk_ref_sp(base);
}
- return new SkColorFilterShader(base, filter);
+ return sk_make_sp<SkColorFilterShader>(base, filter);
}
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkLocalMatrixShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698