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

Unified Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 1404823005: GrDrawContext now holds GrRenderTarget pointer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix overlength line Created 5 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/SkMaskFilter.cpp ('k') | src/effects/SkBlurMaskFilter.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 95860acec937dfef442f17ee85e411b1325f5139..32de52250a36f081e7ecc7232a8bfe92cab97ec1 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -251,7 +251,7 @@ SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region,
#if SK_SUPPORT_GPU
bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
GrTexture* texture,
- const SkMatrix& in_matrix,
+ const SkMatrix& inMatrix,
const SkIRect&) const {
if (fp) {
GrContext* context = texture->getContext();
@@ -272,17 +272,17 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
return false;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext());
+ SkAutoTUnref<GrDrawContext> drawContext(
+ context->drawContext(maskTexture->asRenderTarget()));
if (drawContext) {
GrPaint grPaint;
grPaint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
SkRegion::Iterator iter(fRegion);
- drawContext->clear(maskTexture->asRenderTarget(), nullptr, 0x0, true);
+ drawContext->clear(nullptr, 0x0, true);
while (!iter.done()) {
SkRect rect = SkRect::Make(iter.rect());
- drawContext->drawRect(maskTexture->asRenderTarget(), GrClip::WideOpen(), grPaint,
- in_matrix, rect);
+ drawContext->drawRect(GrClip::WideOpen(), grPaint, inMatrix, rect);
iter.next();
}
}
« no previous file with comments | « src/core/SkMaskFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698