OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED |
9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED |
10 | 10 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 * intends to specify fractional pixel coverage (via setCoverage(), through a coverage vertex | 152 * intends to specify fractional pixel coverage (via setCoverage(), through a coverage vertex |
153 * attribute, or a coverage effect) but may not have specified it yet. | 153 * attribute, or a coverage effect) but may not have specified it yet. |
154 */ | 154 */ |
155 bool couldApplyCoverage(const GrDrawTargetCaps& caps) const; | 155 bool couldApplyCoverage(const GrDrawTargetCaps& caps) const; |
156 | 156 |
157 /** | 157 /** |
158 * Determines whether the output coverage is guaranteed to be one for all pi xels hit by a draw. | 158 * Determines whether the output coverage is guaranteed to be one for all pi xels hit by a draw. |
159 */ | 159 */ |
160 bool hasSolidCoverage() const; | 160 bool hasSolidCoverage() const; |
161 | 161 |
162 /** | |
163 * Determines whether or not a draw will do any blending with the current dr aw state. For it to | |
164 * be unblended, it must have solid coverage, have final blend coeffs [1,0], and no effect can | |
bsalomon
2014/11/11 20:49:56
Can we not document the implementation but rather
egdaniel
2014/11/11 21:05:55
Done.
| |
165 * readDst (otherwise custom blending will occur with in a fragment stage). | |
166 */ | |
167 bool isUnblended() const; | |
168 | |
162 /// @} | 169 /// @} |
163 | 170 |
164 /////////////////////////////////////////////////////////////////////////// | 171 /////////////////////////////////////////////////////////////////////////// |
165 /// @name Color | 172 /// @name Color |
166 //// | 173 //// |
167 | 174 |
168 GrColor getColor() const { return fColor; } | 175 GrColor getColor() const { return fColor; } |
169 | 176 |
170 /** | 177 /** |
171 * Sets color for next draw to a premultiplied-alpha color. | 178 * Sets color for next draw to a premultiplied-alpha color. |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
833 int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt ]; | 840 int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt ]; |
834 | 841 |
835 friend class GrOptDrawState; | 842 friend class GrOptDrawState; |
836 | 843 |
837 typedef SkRefCnt INHERITED; | 844 typedef SkRefCnt INHERITED; |
838 }; | 845 }; |
839 | 846 |
840 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 847 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
841 | 848 |
842 #endif | 849 #endif |
OLD | NEW |