OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrProcOptInfo.h" | 8 #include "GrProcOptInfo.h" |
9 | 9 |
10 #include "GrBatch.h" | |
11 #include "GrGeometryProcessor.h" | 10 #include "GrGeometryProcessor.h" |
12 | 11 |
| 12 #include "batches/GrBatch.h" |
| 13 |
13 void GrProcOptInfo::calcColorWithBatch(const GrBatch* batch, | 14 void GrProcOptInfo::calcColorWithBatch(const GrBatch* batch, |
14 const GrFragmentStage* stages, | 15 const GrFragmentStage* stages, |
15 int stageCount) { | 16 int stageCount) { |
16 GrInitInvariantOutput out; | 17 GrInitInvariantOutput out; |
17 batch->getInvariantOutputColor(&out); | 18 batch->getInvariantOutputColor(&out); |
18 fInOut.reset(out); | 19 fInOut.reset(out); |
19 this->internalCalc(stages, stageCount, batch->willReadFragmentPosition()); | 20 this->internalCalc(stages, stageCount, batch->willReadFragmentPosition()); |
20 } | 21 } |
21 | 22 |
22 void GrProcOptInfo::calcCoverageWithBatch(const GrBatch* batch, | 23 void GrProcOptInfo::calcCoverageWithBatch(const GrBatch* batch, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 fInputColor = fInOut.color(); | 87 fInputColor = fInOut.color(); |
87 fInputColorIsUsed = true; | 88 fInputColorIsUsed = true; |
88 // Since we are clearing all previous color stages we are in a state
where we have found | 89 // Since we are clearing all previous color stages we are in a state
where we have found |
89 // zero stages that don't multiply the inputColor. | 90 // zero stages that don't multiply the inputColor. |
90 fInOut.resetNonMulStageFound(); | 91 fInOut.resetNonMulStageFound(); |
91 // Reset these since we don't care if previous stages read these val
ues | 92 // Reset these since we don't care if previous stages read these val
ues |
92 fReadsFragPosition = initWillReadFragmentPosition; | 93 fReadsFragPosition = initWillReadFragmentPosition; |
93 } | 94 } |
94 } | 95 } |
95 } | 96 } |
OLD | NEW |