Index: src/effects/SkPerlinNoiseShader.cpp |
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp |
index 2a4ad92ea9e572e01c9a504cc23ce4fcbd41da72..a530753d88008f48a9fa77c40663e363a5ae44db 100644 |
--- a/src/effects/SkPerlinNoiseShader.cpp |
+++ b/src/effects/SkPerlinNoiseShader.cpp |
@@ -602,11 +602,11 @@ const GrFragmentProcessor* GrPerlinNoiseEffect::TestCreate(GrProcessorTestData* |
SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, |
0.99f); |
- SkShader* shader = d->fRandom->nextBool() ? |
+ SkAutoTUnref<SkShader> shader(d->fRandom->nextBool() ? |
SkPerlinNoiseShader::CreateFractalNoise(baseFrequencyX, baseFrequencyY, numOctaves, seed, |
stitchTiles ? &tileSize : nullptr) : |
SkPerlinNoiseShader::CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, |
- stitchTiles ? &tileSize : nullptr); |
+ stitchTiles ? &tileSize : nullptr)); |
GrPaint grPaint; |
return shader->asFragmentProcessor(d->fContext, |