| 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 GrProcOptInfo() | 25 GrProcOptInfo() |
| 26 : fInOut(0, static_cast<GrColorComponentFlags>(0), false) | 26 : fInOut(0, static_cast<GrColorComponentFlags>(0), false) |
| 27 , fFirstEffectiveProcessorIndex(0) | 27 , fFirstEffectiveProcessorIndex(0) |
| 28 , fInputColorIsUsed(true) | 28 , fInputColorIsUsed(true) |
| 29 , fInputColor(0) {} | 29 , fInputColor(0) {} |
| 30 | 30 |
| 31 void calcWithInitialValues(const GrFragmentProcessor* const *, int cnt, GrCo
lor startColor, | 31 void calcWithInitialValues(const GrFragmentProcessor* const *, int cnt, GrCo
lor startColor, |
| 32 GrColorComponentFlags, bool areCoverageStages, bo
ol isLCD = false); | 32 GrColorComponentFlags, bool areCoverageStages, bo
ol isLCD = false); |
| 33 void initUsingInvariantOutput(GrInitInvariantOutput invOutput); | 33 void initUsingInvariantOutput(GrInitInvariantOutput invOutput); |
| 34 void completeCalculations(const GrFragmentProcessor * const processors[], in
t cnt); | 34 void completeCalculations(const GrFragmentProcessor * const processors[], in
t cnt); |
| 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 bool allStagesMultiplyInput() const { return fInOut.allStagesMulInput(); } | 39 bool allStagesMultiplyInput() const { return fInOut.allStagesMulInput(); } |
| 40 | 40 |
| 41 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. | 41 // TODO: Once texture pixel configs quaries are updated, we no longer need t
his function. |
| 42 // For now this function will correctly tell us if we are using LCD text or
not and should only | 42 // For now this function will correctly tell us if we are using LCD text or
not and should only |
| 43 // be called when looking at the coverage output. | 43 // be called when looking at the coverage output. |
| 44 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && | 44 bool isFourChannelOutput() const { return !fInOut.isSingleComponent() && |
| 45 fInOut.isLCDCoverage(); } | 45 fInOut.isLCDCoverage(); } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 76 private: | 76 private: |
| 77 void internalCalc(const GrFragmentProcessor* const[], int cnt); | 77 void internalCalc(const GrFragmentProcessor* const[], int cnt); |
| 78 | 78 |
| 79 GrInvariantOutput fInOut; | 79 GrInvariantOutput fInOut; |
| 80 int fFirstEffectiveProcessorIndex; | 80 int fFirstEffectiveProcessorIndex; |
| 81 bool fInputColorIsUsed; | 81 bool fInputColorIsUsed; |
| 82 GrColor fInputColor; | 82 GrColor fInputColor; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 #endif | 85 #endif |
| OLD | NEW |