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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1431593006: 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 7b1464ca7fb94d3151d785dc1c57d03e4eafd68a..e13d9b81a7a51b5281cf4384c25341c2a2c162bb 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -221,14 +221,9 @@ void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBat
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.scissorState(), batch)) {
+ if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip, batch)) {
return;
}
@@ -351,12 +346,6 @@ void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
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();
@@ -365,7 +354,7 @@ void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
batch->setStencilSettings(stencilSettings);
GrPipeline::CreateArgs args;
- if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip.scissorState(), batch)) {
+ if (!this->installPipelineInDrawBatch(&pipelineBuilder, &clip, batch)) {
return;
}
@@ -545,14 +534,19 @@ void GrDrawTarget::recordBatch(GrBatch* batch) {
///////////////////////////////////////////////////////////////////////////////
bool GrDrawTarget::installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder,
- const GrScissorState* scissor,
- GrDrawBatch* batch) {
+ const GrAppliedClip* clip, GrDrawBatch* batch) {
+ GrPipelineBuilder::AutoRestoreFragmentProcessorState arfps;
+ if (clip->clipCoverageFragmentProcessor()) {
+ arfps.set(pipelineBuilder);
+ arfps.addCoverageFragmentProcessor(clip->clipCoverageFragmentProcessor());
+ }
+
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