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 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 GrProcOptInfo() | 26 GrProcOptInfo() |
27 : fInOut(0, static_cast<GrColorComponentFlags>(0), false) | 27 : fInOut(0, static_cast<GrColorComponentFlags>(0), false) |
28 , fFirstEffectiveProcessorIndex(0) | 28 , fFirstEffectiveProcessorIndex(0) |
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, bo
ol isLCD = false); | 34 GrColorComponentFlags, bool areCoverageStages, bo
ol isLCD = false); |
35 | 35 void initUsingInvariantOutput(GrInitInvariantOutput invOutput); |
36 void calcColorWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const
[], int cnt); | 36 void completeCalculations(const GrFragmentProcessor * const processors[], in
t cnt); |
37 void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentProcessor* co
nst[], int cnt); | 37 |
38 | |
39 bool isSolidWhite() const { return fInOut.isSolidWhite(); } | 38 bool isSolidWhite() const { return fInOut.isSolidWhite(); } |
40 bool isOpaque() const { return fInOut.isOpaque(); } | 39 bool isOpaque() const { return fInOut.isOpaque(); } |
41 bool isSingleComponent() const { return fInOut.isSingleComponent(); } | 40 bool isSingleComponent() const { return fInOut.isSingleComponent(); } |
42 bool allStagesMultiplyInput() const { return fInOut.allStagesMulInput(); } | 41 bool allStagesMultiplyInput() const { return fInOut.allStagesMulInput(); } |
43 | 42 |
44 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. | 43 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. |
45 // For now this function will correctly tell us if we are using LCD text or
not and should only | 44 // For now this function will correctly tell us if we are using LCD text or
not and should only |
46 // be called when looking at the coverage output. | 45 // be called when looking at the coverage output. |
47 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && | 46 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && |
48 fInOut.isLCDCoverage(); } | 47 fInOut.isLCDCoverage(); } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void internalCalc(const GrFragmentProcessor* const[], int cnt, bool initWill
ReadFragPosition); | 84 void internalCalc(const GrFragmentProcessor* const[], int cnt, bool initWill
ReadFragPosition); |
86 | 85 |
87 GrInvariantOutput fInOut; | 86 GrInvariantOutput fInOut; |
88 int fFirstEffectiveProcessorIndex; | 87 int fFirstEffectiveProcessorIndex; |
89 bool fInputColorIsUsed; | 88 bool fInputColorIsUsed; |
90 GrColor fInputColor; | 89 GrColor fInputColor; |
91 bool fReadsFragPosition; | 90 bool fReadsFragPosition; |
92 }; | 91 }; |
93 | 92 |
94 #endif | 93 #endif |
OLD | NEW |