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())) { |