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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 /// The input color to the first color-stage is either the constant color or interpolated | 242 /// The input color to the first color-stage is either the constant color or interpolated |
243 /// per-vertex colors. The input to the first coverage stage is either a con stant coverage | 243 /// per-vertex colors. The input to the first coverage stage is either a con stant coverage |
244 /// (usually full-coverage) or interpolated per-vertex coverage. | 244 /// (usually full-coverage) or interpolated per-vertex coverage. |
245 /// | 245 /// |
246 /// See the documentation of kCoverageDrawing_StateBit for information about disabling the | 246 /// See the documentation of kCoverageDrawing_StateBit for information about disabling the |
247 /// the color / coverage distinction. | 247 /// the color / coverage distinction. |
248 //// | 248 //// |
249 | 249 |
250 int numColorStages() const { return fColorStages.count(); } | 250 int numColorStages() const { return fColorStages.count(); } |
251 int numCoverageStages() const { return fCoverageStages.count(); } | 251 int numCoverageStages() const { return fCoverageStages.count(); } |
252 int numFragmentStages() const { return this->numColorStages() + this->numCov erageStages(); } | |
252 int numTotalStages() const { | 253 int numTotalStages() const { |
253 return this->numColorStages() + this->numCoverageStages() + | 254 return this->numColorStages() + this->numCoverageStages() + |
egdaniel
2014/11/10 16:28:06
Should we just make this numFragmentStages() inste
| |
254 (this->hasGeometryProcessor() ? 1 : 0); | 255 (this->hasGeometryProcessor() ? 1 : 0); |
255 } | 256 } |
256 | 257 |
257 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } | 258 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } |
258 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } | 259 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } |
259 const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id x]; } | 260 const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id x]; } |
260 const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta ges[idx]; } | 261 const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta ges[idx]; } |
261 | 262 |
262 /** | 263 /** |
263 * Checks whether any of the effects will read the dst pixel color. | 264 * Checks whether any of the effects will read the dst pixel color. |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
851 mutable uint32_t fCachedCapsID; | 852 mutable uint32_t fCachedCapsID; |
852 | 853 |
853 friend class GrOptDrawState; | 854 friend class GrOptDrawState; |
854 | 855 |
855 typedef SkRefCnt INHERITED; | 856 typedef SkRefCnt INHERITED; |
856 }; | 857 }; |
857 | 858 |
858 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 859 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
859 | 860 |
860 #endif | 861 #endif |
OLD | NEW |