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 "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if (pipelineBuilder.isDither()) { | 64 if (pipelineBuilder.isDither()) { |
65 fFlags |= kDither_Flag; | 65 fFlags |= kDither_Flag; |
66 } | 66 } |
67 | 67 |
68 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); | 68 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); |
69 | 69 |
70 // TODO: Once we can handle single or four channel input into coverage stage
s then we can use | 70 // TODO: Once we can handle single or four channel input into coverage stage
s then we can use |
71 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi
al information. | 71 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi
al information. |
72 int firstCoverageStageIdx = 0; | 72 int firstCoverageStageIdx = 0; |
73 | 73 |
74 GrXferProcessor::BlendInfo blendInfo; | |
75 fXferProcessor->getBlendInfo(&blendInfo); | |
76 | |
77 this->adjustProgramFromOptimizations(pipelineBuilder, optFlags, colorPOI, co
veragePOI, | 74 this->adjustProgramFromOptimizations(pipelineBuilder, optFlags, colorPOI, co
veragePOI, |
78 &firstColorStageIdx, &firstCoverageStag
eIdx); | 75 &firstColorStageIdx, &firstCoverageStag
eIdx); |
79 | 76 |
80 bool usesLocalCoords = false; | 77 bool usesLocalCoords = false; |
81 | 78 |
82 // Copy Stages from PipelineBuilder to Pipeline | 79 // Copy Stages from PipelineBuilder to Pipeline |
83 for (int i = firstColorStageIdx; i < pipelineBuilder.numColorFragmentStages(
); ++i) { | 80 for (int i = firstColorStageIdx; i < pipelineBuilder.numColorFragmentStages(
); ++i) { |
84 SkNEW_APPEND_TO_TARRAY(&fFragmentStages, | 81 SkNEW_APPEND_TO_TARRAY(&fFragmentStages, |
85 GrPendingFragmentStage, | 82 GrPendingFragmentStage, |
86 (pipelineBuilder.fColorStages[i])); | 83 (pipelineBuilder.fColorStages[i])); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); | 150 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); |
154 for (int i = 0; i < this->numFragmentStages(); i++) { | 151 for (int i = 0; i < this->numFragmentStages(); i++) { |
155 | 152 |
156 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { | 153 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { |
157 return false; | 154 return false; |
158 } | 155 } |
159 } | 156 } |
160 return true; | 157 return true; |
161 } | 158 } |
162 | 159 |
OLD | NEW |