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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
247 bool willUseInputColor() const { return fWillUseInputColor; } | 247 bool willUseInputColor() const { return fWillUseInputColor; } |
248 | 248 |
249 /** | 249 /** |
250 * If isSingleComponent is true, then the flag values for r, g, b, and a mus t all be the | 250 * If isSingleComponent is true, then the flag values for r, g, b, and a mus t all be the |
251 * same. If the flags are all set then all color components must be equal. | 251 * same. If the flags are all set then all color components must be equal. |
252 */ | 252 */ |
253 SkDEBUGCODE(void validate() const;) | 253 SkDEBUGCODE(void validate() const;) |
254 | 254 |
255 private: | 255 private: |
256 friend class GrProcOptInfo; | 256 friend class GrProcOptInfo; |
257 friend class GrPipelineBuilder; | |
joshualitt
2015/11/23 19:09:28
Uneccessary
| |
257 | 258 |
258 /** Extracts the alpha channel and returns true if r,g,b == a. */ | 259 /** Extracts the alpha channel and returns true if r,g,b == a. */ |
259 static bool GetAlphaAndCheckSingleChannel(GrColor color, uint32_t* alpha) { | 260 static bool GetAlphaAndCheckSingleChannel(GrColor color, uint32_t* alpha) { |
260 *alpha = GrColorUnpackA(color); | 261 *alpha = GrColorUnpackA(color); |
261 return *alpha == GrColorUnpackR(color) && *alpha == GrColorUnpackG(color ) && | 262 return *alpha == GrColorUnpackR(color) && *alpha == GrColorUnpackG(color ) && |
262 *alpha == GrColorUnpackB(color); | 263 *alpha == GrColorUnpackB(color); |
263 } | 264 } |
264 | 265 |
265 void reset(GrColor color, GrColorComponentFlags flags, bool isSingleComponen t) { | 266 void reset(GrColor color, GrColorComponentFlags flags, bool isSingleComponen t) { |
266 fColor = color; | 267 fColor = color; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
321 GrColorComponentFlags fValidFlags; | 322 GrColorComponentFlags fValidFlags; |
322 bool fIsSingleComponent; | 323 bool fIsSingleComponent; |
323 bool fNonMulStageFound; | 324 bool fNonMulStageFound; |
324 bool fWillUseInputColor; | 325 bool fWillUseInputColor; |
325 bool fIsLCDCoverage; // Temorary data member until texture pixel configs are updated | 326 bool fIsLCDCoverage; // Temorary data member until texture pixel configs are updated |
326 | 327 |
327 }; | 328 }; |
328 | 329 |
329 #endif | 330 #endif |
330 | 331 |
OLD | NEW |