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

Unified Diff: src/core/SkColorFilterShader.cpp

Issue 1855733002: change flattenable factory to return sk_sp (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/SkColorFilter.cpp ('k') | src/core/SkColorMatrixFilterRowMajor255.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 8a175024def79963a4da350025f7209c7141a66f..500ead4f743119035413195b71fac11435d65c16 100644
--- a/src/core/SkColorFilterShader.cpp
+++ b/src/core/SkColorFilterShader.cpp
@@ -23,13 +23,13 @@ SkColorFilterShader::SkColorFilterShader(sk_sp<SkShader> shader, sk_sp<SkColorFi
SkASSERT(fFilter);
}
-SkFlattenable* SkColorFilterShader::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkColorFilterShader::CreateProc(SkReadBuffer& buffer) {
auto shader = buffer.readShader();
auto filter = buffer.readColorFilter();
if (!shader || !filter) {
return nullptr;
}
- return new SkColorFilterShader(shader, filter);
+ return sk_make_sp<SkColorFilterShader>(shader, filter);
}
void SkColorFilterShader::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/core/SkColorFilter.cpp ('k') | src/core/SkColorMatrixFilterRowMajor255.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698