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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1407063011: Revert of Fix mixed samples stencil clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrDrawTarget.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index e13d9b81a7a51b5281cf4384c25341c2a2c162bb..7b1464ca7fb94d3151d785dc1c57d03e4eafd68a 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -221,9 +221,14 @@
if (!fClipMaskManager->setupClipping(pipelineBuilder, &ars, &batch->bounds(), &clip)) {
return;
}
+ GrPipelineBuilder::AutoRestoreFragmentProcessorState arfps;
+ if (clip.clipCoverageFragmentProcessor()) {
+ arfps.set(&pipelineBuilder);
+ arfps.addCoverageFragmentProcessor(clip.clipCoverageFragmentProcessor());
+ }
GrPipeline::CreateArgs args;
- if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip, batch)) {
+ if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip.scissorState(), batch)) {
return;
}
@@ -346,6 +351,12 @@
return;
}
+ GrPipelineBuilder::AutoRestoreFragmentProcessorState arfps;
+ if (clip.clipCoverageFragmentProcessor()) {
+ arfps.set(&pipelineBuilder);
+ arfps.addCoverageFragmentProcessor(clip.clipCoverageFragmentProcessor());
+ }
+
// Ensure the render target has a stencil buffer and get the stencil settings.
GrStencilSettings stencilSettings;
GrRenderTarget* rt = pipelineBuilder.getRenderTarget();
@@ -354,7 +365,7 @@
batch->setStencilSettings(stencilSettings);
GrPipeline::CreateArgs args;
- if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip, batch)) {
+ if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip.scissorState(), batch)) {
return;
}
@@ -534,19 +545,14 @@
///////////////////////////////////////////////////////////////////////////////
bool GrDrawTarget::installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder,
- const GrAppliedClip* clip, GrDrawBatch* batch) {
- GrPipelineBuilder::AutoRestoreFragmentProcessorState arfps;
- if (clip->clipCoverageFragmentProcessor()) {
- arfps.set(pipelineBuilder);
- arfps.addCoverageFragmentProcessor(clip->clipCoverageFragmentProcessor());
- }
-
+ const GrScissorState* scissor,
+ GrDrawBatch* batch) {
GrPipeline::CreateArgs args;
args.fPipelineBuilder = pipelineBuilder;
args.fCaps = this->caps();
+ args.fScissor = scissor;
args.fColorPOI = pipelineBuilder->colorProcInfo(batch);
args.fCoveragePOI = pipelineBuilder->coverageProcInfo(batch);
- args.fClip = clip;
if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fColorPOI,
args.fCoveragePOI, &args.fDstTexture,
batch->bounds())) {
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698