Index: src/effects/gradients/SkRadialGradient.cpp |
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp |
index 1312b3692781e311f5cb48ab72f218c8f52d631e..e666ac3cbd0d71baa7c33c2cc0767f9706ef3d0b 100644 |
--- a/src/effects/gradients/SkRadialGradient.cpp |
+++ b/src/effects/gradients/SkRadialGradient.cpp |
@@ -60,7 +60,7 @@ SkShader::GradientType SkRadialGradient::asAGradient(GradientInfo* info) const { |
return kRadial_GradientType; |
} |
-SkFlattenable* SkRadialGradient::CreateProc(SkReadBuffer& buffer) { |
+sk_sp<SkFlattenable> SkRadialGradient::CreateProc(SkReadBuffer& buffer) { |
DescriptorScope desc; |
if (!desc.unflatten(buffer)) { |
return nullptr; |
@@ -68,8 +68,7 @@ SkFlattenable* SkRadialGradient::CreateProc(SkReadBuffer& buffer) { |
const SkPoint center = buffer.readPoint(); |
const SkScalar radius = buffer.readScalar(); |
return SkGradientShader::MakeRadial(center, radius, desc.fColors, desc.fPos, desc.fCount, |
- desc.fTileMode, desc.fGradFlags, |
- desc.fLocalMatrix).release(); |
+ desc.fTileMode, desc.fGradFlags, desc.fLocalMatrix); |
} |
void SkRadialGradient::flatten(SkWriteBuffer& buffer) const { |