Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index f521bd702425fe7e0d1c02314bd9391e84b20082..e9fc865583b3b7b4fb19f092493f19a487519cdb 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -54,7 +54,7 @@ SkLinearGradient::SkLinearGradient(const SkPoint pts[2], const Descriptor& desc) |
, fEnd(pts[1]) { |
} |
-SkFlattenable* SkLinearGradient::CreateProc(SkReadBuffer& buffer) { |
+sk_sp<SkFlattenable> SkLinearGradient::CreateProc(SkReadBuffer& buffer) { |
DescriptorScope desc; |
if (!desc.unflatten(buffer)) { |
return nullptr; |
@@ -63,7 +63,7 @@ SkFlattenable* SkLinearGradient::CreateProc(SkReadBuffer& buffer) { |
pts[0] = buffer.readPoint(); |
pts[1] = buffer.readPoint(); |
return SkGradientShader::MakeLinear(pts, desc.fColors, desc.fPos, desc.fCount, desc.fTileMode, |
- desc.fGradFlags, desc.fLocalMatrix).release(); |
+ desc.fGradFlags, desc.fLocalMatrix); |
} |
void SkLinearGradient::flatten(SkWriteBuffer& buffer) const { |