Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index 15d461960dd8f6b97230d989bbce7d497bc7b660..8ad120991d5176c64fb2439dc823eb76082a48a0 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -78,8 +78,8 @@ SkFlattenable* SkLinearGradient::CreateProc(SkReadBuffer& buffer) { |
SkPoint pts[2]; |
pts[0] = buffer.readPoint(); |
pts[1] = buffer.readPoint(); |
- return SkGradientShader::CreateLinear(pts, desc.fColors, desc.fPos, desc.fCount, |
- desc.fTileMode, desc.fGradFlags, desc.fLocalMatrix); |
+ return SkGradientShader::MakeLinear(pts, desc.fColors, desc.fPos, desc.fCount, desc.fTileMode, |
+ desc.fGradFlags, desc.fLocalMatrix).release(); |
} |
void SkLinearGradient::flatten(SkWriteBuffer& buffer) const { |
@@ -430,9 +430,7 @@ const GrFragmentProcessor* GrLinearGradient::TestCreate(GrProcessorTestData* d) |
SkScalar* stops = stopsArray; |
SkShader::TileMode tm; |
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm); |
- SkAutoTUnref<SkShader> shader(SkGradientShader::CreateLinear(points, |
- colors, stops, colorCount, |
- tm)); |
+ auto shader = SkGradientShader::MakeLinear(points, colors, stops, colorCount, tm); |
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext, |
GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality); |
GrAlwaysAssert(fp); |