Index: src/core/SkLightingShader.cpp |
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp |
index fdd0a04aeeb31539cc07914487b88357df0d7ad0..eba7d652eb6d1448551599557b7a259319222c80 100644 |
--- a/src/core/SkLightingShader.cpp |
+++ b/src/core/SkLightingShader.cpp |
@@ -552,7 +552,7 @@ void SkLightingShaderImpl::toString(SkString* str) const { |
} |
#endif |
-SkFlattenable* SkLightingShaderImpl::CreateProc(SkReadBuffer& buf) { |
+sk_sp<SkFlattenable> SkLightingShaderImpl::CreateProc(SkReadBuffer& buf) { |
SkMatrix diffLocalM; |
bool hasDiffLocalM = buf.readBool(); |
if (hasDiffLocalM) { |
@@ -606,8 +606,8 @@ SkFlattenable* SkLightingShaderImpl::CreateProc(SkReadBuffer& buf) { |
SkAutoTUnref<const SkLightingShader::Lights> lights(builder.finish()); |
- return new SkLightingShaderImpl(diffuse, normal, lights, SkVector::Make(1.0f, 0.0f), |
- &diffLocalM, &normLocalM); |
+ return sk_make_sp<SkLightingShaderImpl>(diffuse, normal, lights, SkVector::Make(1.0f, 0.0f), |
+ &diffLocalM, &normLocalM); |
} |
void SkLightingShaderImpl::flatten(SkWriteBuffer& buf) const { |