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

Unified Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 638403003: Remove uses of GrAutoScratchTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 823c3028c51e76df00aa7c188f41a3eb5c0b5be6..025a757b798132efff48129a40993ad5dc4a8c3f 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -284,14 +284,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);
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698