Chromium Code Reviews| Index: src/gpu/GrPipeline.cpp |
| diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp |
| index 906426caaaecc0699dd8d878ee2ccdfa9bdfd6dd..d1ebad03104b3b19b24ac0df37f6c34c4bf06dea 100644 |
| --- a/src/gpu/GrPipeline.cpp |
| +++ b/src/gpu/GrPipeline.cpp |
| @@ -29,11 +29,30 @@ GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder, |
| overrideColor = colorPOI.inputColorToEffectiveStage(); |
| } |
| + fRenderTarget.reset(pipelineBuilder.fRenderTarget.get()); |
| + SkASSERT(fRenderTarget); |
| + |
| + fFlags = 0; |
| + if (pipelineBuilder.isHWAntialias()) { |
| + fFlags |= kHWAA_Flag; |
| + } |
| + if (pipelineBuilder.isDither()) { |
| + fFlags |= kDither_Flag; |
| + } |
| + |
| GrXferProcessor::OptFlags optFlags; |
| if (xferProcessor) { |
| fXferProcessor.reset(xferProcessor.get()); |
| - optFlags = xferProcessor->getOptimizations(colorPOI, |
| + GrProcOptInfo localColorPOI = colorPOI; |
| + // Optimizations will try to turn off blending which is required by mixed |
| + // sampled modes. |
| + bool isMixedSampledTarget = |
| + (this->getRenderTarget()->sampleConfig() == kStencil_GrSampleConfig); |
| + localColorPOI.setNeedsCoverageModulation(this->isHWAntialiasState() && |
| + isMixedSampledTarget); |
| + |
| + optFlags = xferProcessor->getOptimizations(localColorPOI, |
|
Mark Kilgard
2015/03/24 14:05:08
For Google: enabling/disabling GL_BLEND when usin
|
| coveragePOI, |
| pipelineBuilder.getStencil().doesWrite(), |
| &overrideColor, |
| @@ -51,20 +70,10 @@ GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder, |
| return; |
| } |
| - fRenderTarget.reset(pipelineBuilder.fRenderTarget.get()); |
| - SkASSERT(fRenderTarget); |
| fScissorState = scissorState; |
| fStencilSettings = pipelineBuilder.getStencil(); |
| fDrawFace = pipelineBuilder.getDrawFace(); |
| - fFlags = 0; |
| - if (pipelineBuilder.isHWAntialias()) { |
| - fFlags |= kHWAA_Flag; |
| - } |
| - if (pipelineBuilder.isDither()) { |
| - fFlags |= kDither_Flag; |
| - } |
| - |
| int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); |
| // TODO: Once we can handle single or four channel input into coverage stages then we can use |