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 GrInvariantOutput_DEFINED | 8 #ifndef GrInvariantOutput_DEFINED |
9 #define GrInvariantOutput_DEFINED | 9 #define GrInvariantOutput_DEFINED |
10 | 10 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 bool isSolidWhite() const { | 204 bool isSolidWhite() const { |
205 return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fCol
or); | 205 return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fCol
or); |
206 } | 206 } |
207 | 207 |
208 bool isSingleComponent() const { return fIsSingleComponent; } | 208 bool isSingleComponent() const { return fIsSingleComponent; } |
209 | 209 |
210 bool willUseInputColor() const { return fWillUseInputColor; } | 210 bool willUseInputColor() const { return fWillUseInputColor; } |
211 void resetWillUseInputColor() { fWillUseInputColor = true; } | 211 void resetWillUseInputColor() { fWillUseInputColor = true; } |
212 | 212 |
| 213 bool allStagesMulInput() const { return !fNonMulStageFound; } |
213 void resetNonMulStageFound() { fNonMulStageFound = false; } | 214 void resetNonMulStageFound() { fNonMulStageFound = false; } |
214 | 215 |
215 bool isLCDCoverage() const { return fIsLCDCoverage; } | 216 bool isLCDCoverage() const { return fIsLCDCoverage; } |
216 | 217 |
217 SkDEBUGCODE(bool colorComponentsAllEqual() const;) | 218 SkDEBUGCODE(bool colorComponentsAllEqual() const;) |
218 /** | 219 /** |
219 * If alpha is valid, check that any valid R,G,B values are <= A | 220 * If alpha is valid, check that any valid R,G,B values are <= A |
220 */ | 221 */ |
221 SkDEBUGCODE(bool validPreMulColor() const;) | 222 SkDEBUGCODE(bool validPreMulColor() const;) |
222 | 223 |
223 GrColor fColor; | 224 GrColor fColor; |
224 uint32_t fValidFlags; | 225 uint32_t fValidFlags; |
225 bool fIsSingleComponent; | 226 bool fIsSingleComponent; |
226 bool fNonMulStageFound; | 227 bool fNonMulStageFound; |
227 bool fWillUseInputColor; | 228 bool fWillUseInputColor; |
228 bool fIsLCDCoverage; // Temorary data member until texture pixel configs are
updated | 229 bool fIsLCDCoverage; // Temorary data member until texture pixel configs are
updated |
229 | 230 |
230 }; | 231 }; |
231 | 232 |
232 #endif | 233 #endif |
233 | 234 |
OLD | NEW |