| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrPipeline.h" | 8 #include "GrPipeline.h" |
| 9 | 9 |
| 10 #include "GrCaps.h" | 10 #include "GrCaps.h" |
| 11 #include "GrBatch.h" | 11 #include "GrBatch.h" |
| 12 #include "GrGpu.h" | 12 #include "GrGpu.h" |
| 13 #include "GrPipelineBuilder.h" | 13 #include "GrPipelineBuilder.h" |
| 14 #include "GrProcOptInfo.h" | 14 #include "GrProcOptInfo.h" |
| 15 #include "GrXferProcessor.h" | 15 #include "GrXferProcessor.h" |
| 16 | 16 |
| 17 GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder, | 17 GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder, |
| 18 const GrProcOptInfo& colorPOI, | 18 const GrProcOptInfo& colorPOI, |
| 19 const GrProcOptInfo& coveragePOI, | 19 const GrProcOptInfo& coveragePOI, |
| 20 const GrCaps& caps, | 20 const GrCaps& caps, |
| 21 const GrScissorState& scissorState, | 21 const GrScissorState& scissorState, |
| 22 const GrXferProcessor::DstTexture* dstTexture) { | 22 const GrDeviceCoordTexture* dstCopy) { |
| 23 // Create XferProcessor from DS's XPFactory | 23 // Create XferProcessor from DS's XPFactory |
| 24 SkAutoTUnref<GrXferProcessor> xferProcessor( | 24 SkAutoTUnref<GrXferProcessor> xferProcessor( |
| 25 pipelineBuilder.getXPFactory()->createXferProcessor( | 25 pipelineBuilder.getXPFactory()->createXferProcessor(colorPOI, coveragePO
I, dstCopy, caps)); |
| 26 colorPOI, coveragePOI, dstTexture, caps)); | |
| 27 | 26 |
| 28 GrColor overrideColor = GrColor_ILLEGAL; | 27 GrColor overrideColor = GrColor_ILLEGAL; |
| 29 if (colorPOI.firstEffectiveStageIndex() != 0) { | 28 if (colorPOI.firstEffectiveStageIndex() != 0) { |
| 30 overrideColor = colorPOI.inputColorToEffectiveStage(); | 29 overrideColor = colorPOI.inputColorToEffectiveStage(); |
| 31 } | 30 } |
| 32 | 31 |
| 33 GrXferProcessor::OptFlags optFlags; | 32 GrXferProcessor::OptFlags optFlags; |
| 34 if (xferProcessor) { | 33 if (xferProcessor) { |
| 35 fXferProcessor.reset(xferProcessor.get()); | 34 fXferProcessor.reset(xferProcessor.get()); |
| 36 | 35 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); | 153 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); |
| 155 for (int i = 0; i < this->numFragmentStages(); i++) { | 154 for (int i = 0; i < this->numFragmentStages(); i++) { |
| 156 | 155 |
| 157 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { | 156 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { |
| 158 return false; | 157 return false; |
| 159 } | 158 } |
| 160 } | 159 } |
| 161 return true; | 160 return true; |
| 162 } | 161 } |
| 163 | 162 |
| OLD | NEW |