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

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: clean up 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
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 95860acec937dfef442f17ee85e411b1325f5139..5bf7885072c9cef6d679dce5620d986c2b5f037e 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,16 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
return false;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext());
+ SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(maskTexture->asRenderTarget()));
bsalomon 2015/10/15 14:33:04 line wrap (if you care...)
robertphillips 2015/10/15 14:40:59 Done.
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();
}
}

Powered by Google App Engine
This is Rietveld 408576698