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

Unified Diff: src/gpu/SkGr.cpp

Issue 956083002: Revert of Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: Created 5 years, 10 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/gpu/SkGpuDevice.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index b0814af1de931f79b896faaa74ef494a67c82b54..d069fe0434c196ce0d368cc5070512b03d9e23e0 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -243,8 +243,9 @@
SkRect rect = SkRect::MakeWH(SkIntToScalar(rtDesc.fWidth), SkIntToScalar(rtDesc.fHeight));
SkRect localRect = SkRect::MakeWH(1.f, 1.f);
- context->drawNonAARectToRect(stretched->asRenderTarget(), GrClip::WideOpen(), paint,
- SkMatrix::I(), rect, localRect);
+ GrContext::AutoClip ac(context, GrContext::AutoClip::kWideOpen_InitialClip);
+ context->drawNonAARectToRect(stretched->asRenderTarget(), paint, SkMatrix::I(), rect,
+ localRect);
return stretched;
}
@@ -391,8 +392,8 @@
paint.addColorProcessor(yuvToRgbProcessor);
SkRect r = SkRect::MakeWH(SkIntToScalar(yuvInfo.fSize[0].fWidth),
SkIntToScalar(yuvInfo.fSize[0].fHeight));
-
- ctx->drawRect(renderTarget, GrClip::WideOpen(), paint, SkMatrix::I(), r);
+ GrContext::AutoClip ac(ctx, GrContext::AutoClip::kWideOpen_InitialClip);
+ ctx->drawRect(renderTarget, paint, SkMatrix::I(), r);
return result;
}
@@ -705,6 +706,8 @@
// asFragmentProcessor(). Since these calls get passed back to the client, we don't really
// want them messing around with the context.
{
+ GrContext::AutoClip ac(context, GrContext::AutoClip::kWideOpen_InitialClip);
+
// Allow the shader to modify paintColor and also create an effect to be installed as
// the first color effect on the GrPaint.
GrFragmentProcessor* fp = NULL;
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698