diff options
author | 2016-10-27 14:47:55 -0400 | |
---|---|---|
committer | 2016-10-27 19:14:09 +0000 | |
commit | 1105224f9701e57ec5ce0354d6a380b664f5c638 (patch) | |
tree | 2b6f3db0bfd99da5e22adabc0da37d9271c8b543 /src/effects/SkAlphaThresholdFilter.cpp | |
parent | 6e74412a9cf1ffa44271a55b42f18e8a0813a0a2 (diff) |
Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030
Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/effects/SkAlphaThresholdFilter.cpp')
-rw-r--r-- | src/effects/SkAlphaThresholdFilter.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index bbae2e1552..b1c8b21460 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -16,7 +16,7 @@ #if SK_SUPPORT_GPU #include "GrAlphaThresholdFragmentProcessor.h" #include "GrContext.h" -#include "GrDrawContext.h" +#include "GrRenderTargetContext.h" #include "GrFixedClip.h" #endif @@ -97,28 +97,25 @@ sk_sp<GrTexture> SkAlphaThresholdFilterImpl::createMaskTexture(GrContext* contex const SkMatrix& inMatrix, const SkIRect& bounds) const { - sk_sp<GrDrawContext> drawContext(context->makeDrawContextWithFallback(SkBackingFit::kApprox, - bounds.width(), - bounds.height(), - kAlpha_8_GrPixelConfig, - nullptr)); - if (!drawContext) { + sk_sp<GrRenderTargetContext> renderTargetContext(context->makeRenderTargetContextWithFallback( + SkBackingFit::kApprox, bounds.width(), bounds.height(), kAlpha_8_GrPixelConfig, nullptr)); + if (!renderTargetContext) { return nullptr; } GrPaint grPaint; grPaint.setPorterDuffXPFactory(SkBlendMode::kSrc); SkRegion::Iterator iter(fRegion); - drawContext->clear(nullptr, 0x0, true); + renderTargetContext->clear(nullptr, 0x0, true); GrFixedClip clip(SkIRect::MakeWH(bounds.width(), bounds.height())); while (!iter.done()) { SkRect rect = SkRect::Make(iter.rect()); - drawContext->drawRect(clip, grPaint, inMatrix, rect); + renderTargetContext->drawRect(clip, grPaint, inMatrix, rect); iter.next(); } - return drawContext->asTexture(); + return renderTargetContext->asTexture(); } #endif |