Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 638403003: Remove uses of GrAutoScratchTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment change Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698