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 #ifndef GrProcOptInfo_DEFINED | 8 #ifndef GrProcOptInfo_DEFINED |
9 #define GrProcOptInfo_DEFINED | 9 #define GrProcOptInfo_DEFINED |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 , fInputColorIsUsed(true) | 29 , fInputColorIsUsed(true) |
30 , fInputColor(0) | 30 , fInputColor(0) |
31 , fReadsFragPosition(false) {} | 31 , fReadsFragPosition(false) {} |
32 | 32 |
33 void calcWithInitialValues(const GrFragmentProcessor* const *, int cnt, GrCo
lor startColor, | 33 void calcWithInitialValues(const GrFragmentProcessor* const *, int cnt, GrCo
lor startColor, |
34 GrColorComponentFlags, bool areCoverageStages); | 34 GrColorComponentFlags, bool areCoverageStages); |
35 | 35 |
36 void calcColorWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const
[], int cnt); | 36 void calcColorWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const
[], int cnt); |
37 void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentProcessor* co
nst[], int cnt); | 37 void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentProcessor* co
nst[], int cnt); |
38 | 38 |
39 // TODO delete these when batch is everywhere | |
40 void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentProc
essor* const[], | |
41 int cnt); | |
42 void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentP
rocessor* const[], | |
43 int cnt); | |
44 | |
45 bool isSolidWhite() const { return fInOut.isSolidWhite(); } | 39 bool isSolidWhite() const { return fInOut.isSolidWhite(); } |
46 bool isOpaque() const { return fInOut.isOpaque(); } | 40 bool isOpaque() const { return fInOut.isOpaque(); } |
47 bool isSingleComponent() const { return fInOut.isSingleComponent(); } | 41 bool isSingleComponent() const { return fInOut.isSingleComponent(); } |
48 bool allStagesMultiplyInput() const { return fInOut.allStagesMulInput(); } | 42 bool allStagesMultiplyInput() const { return fInOut.allStagesMulInput(); } |
49 | 43 |
50 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. | 44 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. |
51 // For now this function will correctly tell us if we are using LCD text or
not and should only | 45 // For now this function will correctly tell us if we are using LCD text or
not and should only |
52 // be called when looking at the coverage output. | 46 // be called when looking at the coverage output. |
53 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && | 47 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && |
54 fInOut.isLCDCoverage(); } | 48 fInOut.isLCDCoverage(); } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 void internalCalc(const GrFragmentProcessor* const[], int cnt, bool initWill
ReadFragPosition); | 85 void internalCalc(const GrFragmentProcessor* const[], int cnt, bool initWill
ReadFragPosition); |
92 | 86 |
93 GrInvariantOutput fInOut; | 87 GrInvariantOutput fInOut; |
94 int fFirstEffectiveProcessorIndex; | 88 int fFirstEffectiveProcessorIndex; |
95 bool fInputColorIsUsed; | 89 bool fInputColorIsUsed; |
96 GrColor fInputColor; | 90 GrColor fInputColor; |
97 bool fReadsFragPosition; | 91 bool fReadsFragPosition; |
98 }; | 92 }; |
99 | 93 |
100 #endif | 94 #endif |
OLD | NEW |