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