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 19 matching lines...) Expand all Loading... |
30 , fReadsDst(false) {} | 30 , fReadsDst(false) {} |
31 | 31 |
32 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s
tartColor, | 32 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s
tartColor, |
33 GrColorComponentFlags flags, bool areCoverageStag
es, | 33 GrColorComponentFlags flags, bool areCoverageStag
es, |
34 const GrGeometryProcessor* gp = NULL); | 34 const GrGeometryProcessor* gp = NULL); |
35 | 35 |
36 bool isSolidWhite() const { return fInOut.isSolidWhite(); } | 36 bool isSolidWhite() const { return fInOut.isSolidWhite(); } |
37 bool isOpaque() const { return fInOut.isOpaque(); } | 37 bool isOpaque() const { return fInOut.isOpaque(); } |
38 bool isSingleComponent() const { return fInOut.isSingleComponent(); } | 38 bool isSingleComponent() const { return fInOut.isSingleComponent(); } |
39 | 39 |
| 40 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. |
| 41 // For now this function will correctly tell us if we are using LCD text or
not and should only |
| 42 // be called when looking at the coverage output. |
| 43 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && |
| 44 fInOut.isLCDCoverage(); } |
| 45 |
40 GrColor color() const { return fInOut.color(); } | 46 GrColor color() const { return fInOut.color(); } |
41 uint8_t validFlags() const { return fInOut.validFlags(); } | 47 uint8_t validFlags() const { return fInOut.validFlags(); } |
42 | 48 |
43 /** | 49 /** |
44 * Returns the index of the first effective color stage. If an intermediate
stage doesn't read | 50 * Returns the index of the first effective color stage. If an intermediate
stage doesn't read |
45 * its input or has a known output, then we can ignore all earlier stages si
nce they will not | 51 * its input or has a known output, then we can ignore all earlier stages si
nce they will not |
46 * affect the final output. Thus the first effective stage index is the inde
x to the first stage | 52 * affect the final output. Thus the first effective stage index is the inde
x to the first stage |
47 * that will have an effect on the final output. | 53 * that will have an effect on the final output. |
48 * | 54 * |
49 * If stages before the firstEffectiveStageIndex are removed, corresponding
values from | 55 * If stages before the firstEffectiveStageIndex are removed, corresponding
values from |
(...skipping 27 matching lines...) Expand all Loading... |
77 private: | 83 private: |
78 GrInvariantOutput fInOut; | 84 GrInvariantOutput fInOut; |
79 int fFirstEffectStageIndex; | 85 int fFirstEffectStageIndex; |
80 bool fInputColorIsUsed; | 86 bool fInputColorIsUsed; |
81 GrColor fInputColor; | 87 GrColor fInputColor; |
82 bool fRemoveVertexAttrib; | 88 bool fRemoveVertexAttrib; |
83 bool fReadsDst; | 89 bool fReadsDst; |
84 }; | 90 }; |
85 | 91 |
86 #endif | 92 #endif |
OLD | NEW |