Index: src/effects/gradients/SkRadialGradient.cpp |
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp |
index d175f238cd60a9ac67b97eda59fc3587f1718944..1560cd2f391906c1b5495c308836dad19391acdc 100644 |
--- a/src/effects/gradients/SkRadialGradient.cpp |
+++ b/src/effects/gradients/SkRadialGradient.cpp |
@@ -68,8 +68,9 @@ SkFlattenable* SkRadialGradient::CreateProc(SkReadBuffer& buffer) { |
} |
const SkPoint center = buffer.readPoint(); |
const SkScalar radius = buffer.readScalar(); |
- return SkGradientShader::CreateRadial(center, radius, desc.fColors, desc.fPos, desc.fCount, |
- desc.fTileMode, desc.fGradFlags, desc.fLocalMatrix); |
+ return SkGradientShader::MakeRadial(center, radius, desc.fColors, desc.fPos, desc.fCount, |
+ desc.fTileMode, desc.fGradFlags, |
+ desc.fLocalMatrix).release(); |
} |
void SkRadialGradient::flatten(SkWriteBuffer& buffer) const { |
@@ -313,9 +314,7 @@ const GrFragmentProcessor* GrRadialGradient::TestCreate(GrProcessorTestData* d) |
SkScalar* stops = stopsArray; |
SkShader::TileMode tm; |
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm); |
- SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, |
- colors, stops, colorCount, |
- tm)); |
+ auto shader = SkGradientShader::MakeRadial(center, radius, colors, stops, colorCount, tm); |
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext, |
GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality); |
GrAlwaysAssert(fp); |