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

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

Issue 699023003: remove separate color from coverage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 | « expectations/gm/ignored-tests.txt ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 /// The input color to the first color-stage is either the constant color or interpolated 239 /// The input color to the first color-stage is either the constant color or interpolated
240 /// per-vertex colors. The input to the first coverage stage is either a con stant coverage 240 /// per-vertex colors. The input to the first coverage stage is either a con stant coverage
241 /// (usually full-coverage) or interpolated per-vertex coverage. 241 /// (usually full-coverage) or interpolated per-vertex coverage.
242 /// 242 ///
243 /// See the documentation of kCoverageDrawing_StateBit for information about disabling the 243 /// See the documentation of kCoverageDrawing_StateBit for information about disabling the
244 /// the color / coverage distinction. 244 /// the color / coverage distinction.
245 //// 245 ////
246 246
247 int numColorStages() const { return fColorStages.count(); } 247 int numColorStages() const { return fColorStages.count(); }
248 int numCoverageStages() const { return fCoverageStages.count(); } 248 int numCoverageStages() const { return fCoverageStages.count(); }
249 int numFragmentStages() const { return this->numColorStages() + this->numCov erageStages(); }
249 int numTotalStages() const { 250 int numTotalStages() const {
250 return this->numColorStages() + this->numCoverageStages() + 251 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0);
251 (this->hasGeometryProcessor() ? 1 : 0);
252 } 252 }
253 253
254 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } 254 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); }
255 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } 255 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); }
256 const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id x]; } 256 const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id x]; }
257 const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta ges[idx]; } 257 const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta ges[idx]; }
258 258
259 /** 259 /**
260 * Checks whether any of the effects will read the dst pixel color. 260 * Checks whether any of the effects will read the dst pixel color.
261 */ 261 */
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt ]; 833 int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt ];
834 834
835 friend class GrOptDrawState; 835 friend class GrOptDrawState;
836 836
837 typedef SkRefCnt INHERITED; 837 typedef SkRefCnt INHERITED;
838 }; 838 };
839 839
840 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 840 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
841 841
842 #endif 842 #endif
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698