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

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

Issue 789343002: Revert of Create xfer processor backend. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferBlendSolo
Patch Set: Created 6 years 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 | « src/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrOptDrawState.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 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 GrOptDrawState_DEFINED 8 #ifndef GrOptDrawState_DEFINED
9 #define GrOptDrawState_DEFINED 9 #define GrOptDrawState_DEFINED
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 /// 72 ///
73 /// The input color to the first color-stage is either the constant color or interpolated 73 /// The input color to the first color-stage is either the constant color or interpolated
74 /// per-vertex colors. The input to the first coverage stage is either a con stant coverage 74 /// per-vertex colors. The input to the first coverage stage is either a con stant coverage
75 /// (usually full-coverage) or interpolated per-vertex coverage. 75 /// (usually full-coverage) or interpolated per-vertex coverage.
76 //// 76 ////
77 77
78 int numColorStages() const { return fNumColorStages; } 78 int numColorStages() const { return fNumColorStages; }
79 int numCoverageStages() const { return fFragmentStages.count() - fNumColorSt ages; } 79 int numCoverageStages() const { return fFragmentStages.count() - fNumColorSt ages; }
80 int numFragmentStages() const { return fFragmentStages.count(); } 80 int numFragmentStages() const { return fFragmentStages.count(); }
81 int numTotalStages() const { 81 int numTotalStages() const {
82 // the + 1 at the end is for the xferProcessor which will always be pres ent 82 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0);
83 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0 ) + 1;
84 } 83 }
85 84
86 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } 85 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); }
87 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } 86 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); }
88 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; } 87 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; }
89 88
90 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); } 89 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); }
91 90
92 const GrPendingFragmentStage& getColorStage(int idx) const { 91 const GrPendingFragmentStage& getColorStage(int idx) const {
93 SkASSERT(idx < this->numColorStages()); 92 SkASSERT(idx < this->numColorStages());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 241
243 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin. 242 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin.
244 int fNumColorStages; 243 int fNumColorStages;
245 244
246 GrProgramDesc fDesc; 245 GrProgramDesc fDesc;
247 246
248 typedef SkRefCnt INHERITED; 247 typedef SkRefCnt INHERITED;
249 }; 248 };
250 249
251 #endif 250 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698