Index: src/core/SkShader.cpp |
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp |
index e4cbc7b2171340a1ec00aab1f976fdcdadec9629..8032cc6e4cbc1655640b37359a56857cf2b17270 100644 |
--- a/src/core/SkShader.cpp |
+++ b/src/core/SkShader.cpp |
@@ -264,8 +264,8 @@ bool SkColorShader::isOpaque() const { |
return SkColorGetA(fColor) == 255; |
} |
-SkFlattenable* SkColorShader::CreateProc(SkReadBuffer& buffer) { |
- return new SkColorShader(buffer.readColor()); |
+sk_sp<SkFlattenable> SkColorShader::CreateProc(SkReadBuffer& buffer) { |
+ return sk_make_sp<SkColorShader>(buffer.readColor()); |
} |
void SkColorShader::flatten(SkWriteBuffer& buffer) const { |
@@ -419,8 +419,8 @@ bool SkColorShader::ColorShaderContext::onChooseBlitProcs(const SkImageInfo& inf |
/////////////////////////////////////////////////////////////////////////////// |
-SkFlattenable* SkEmptyShader::CreateProc(SkReadBuffer&) { |
- return SkShader::MakeEmptyShader().release(); |
+sk_sp<SkFlattenable> SkEmptyShader::CreateProc(SkReadBuffer&) { |
+ return SkShader::MakeEmptyShader(); |
} |
#ifndef SK_IGNORE_TO_STRING |