Index: src/effects/SkAlphaThresholdFilter.cpp |
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp |
index 462cfec55eeabb6189debcb09403783c3edd7f37..13c0352cf24200087c8d0f6d28ae217a5831c217 100644 |
--- a/src/effects/SkAlphaThresholdFilter.cpp |
+++ b/src/effects/SkAlphaThresholdFilter.cpp |
@@ -285,14 +285,14 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp, |
// the outside. |
maskDesc.fWidth = texture->width(); |
maskDesc.fHeight = texture->height(); |
- GrAutoScratchTexture ast(context, maskDesc, GrContext::kApprox_ScratchTexMatch); |
- GrTexture* maskTexture = ast.texture(); |
- if (NULL == maskTexture) { |
+ SkAutoTUnref<GrTexture> maskTexture( |
+ context->refScratchTexture(maskDesc, GrContext::kApprox_ScratchTexMatch)); |
+ if (!maskTexture) { |
return false; |
} |
{ |
- GrContext::AutoRenderTarget art(context, ast.texture()->asRenderTarget()); |
+ GrContext::AutoRenderTarget art(context, maskTexture->asRenderTarget()); |
GrPaint grPaint; |
grPaint.setBlendFunc(kOne_GrBlendCoeff, kZero_GrBlendCoeff); |
SkRegion::Iterator iter(fRegion); |