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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 bool isOpaque() const { | 137 bool isOpaque() const { |
138 return ((fValidFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpack
A(fColor)); | 138 return ((fValidFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpack
A(fColor)); |
139 } | 139 } |
140 | 140 |
141 bool isSolidWhite() const { | 141 bool isSolidWhite() const { |
142 return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fCol
or); | 142 return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fCol
or); |
143 } | 143 } |
144 | 144 |
| 145 bool isSingleComponent() const { return fIsSingleComponent; } |
| 146 |
145 bool willUseInputColor() const { return fWillUseInputColor; } | 147 bool willUseInputColor() const { return fWillUseInputColor; } |
146 void resetWillUseInputColor() { fWillUseInputColor = true; } | 148 void resetWillUseInputColor() { fWillUseInputColor = true; } |
147 | 149 |
148 void resetNonMulStageFound() { fNonMulStageFound = false; } | 150 void resetNonMulStageFound() { fNonMulStageFound = false; } |
149 | 151 |
150 SkDEBUGCODE(bool colorComponentsAllEqual() const;) | 152 SkDEBUGCODE(bool colorComponentsAllEqual() const;) |
151 /** | 153 /** |
152 * If alpha is valid, check that any valid R,G,B values are <= A | 154 * If alpha is valid, check that any valid R,G,B values are <= A |
153 */ | 155 */ |
154 SkDEBUGCODE(bool validPreMulColor() const;) | 156 SkDEBUGCODE(bool validPreMulColor() const;) |
155 }; | 157 }; |
156 | 158 |
157 #endif | 159 #endif |
158 | 160 |
OLD | NEW |