Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: src/gpu/GrDrawState.h

Issue 715873002: Add isUnblended query to GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrDrawState.cpp » ('j') | src/gpu/GrDrawState.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawState.cpp » ('j') | src/gpu/GrDrawState.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698