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

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

Issue 746423007: Draft change to start pulling uniform color into GP (Closed) Base URL: https://skia.googlesource.com/skia.git@no_factories
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
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0); 82 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0);
83 } 83 }
84 84
85 // TODO hack
86 bool newStyle() const { return hasGeometryProcessor() && getGeometryProcesso r()->fNewStyle; }
87
85 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } 88 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); }
86 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } 89 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); }
87 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; } 90 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; }
88 91
89 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); } 92 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); }
90 93
91 const GrPendingFragmentStage& getColorStage(int idx) const { 94 const GrPendingFragmentStage& getColorStage(int idx) const {
92 SkASSERT(idx < this->numColorStages()); 95 SkASSERT(idx < this->numColorStages());
93 return fFragmentStages[idx]; 96 return fFragmentStages[idx];
94 } 97 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 246
244 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin. 247 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin.
245 int fNumColorStages; 248 int fNumColorStages;
246 249
247 GrProgramDesc fDesc; 250 GrProgramDesc fDesc;
248 251
249 typedef SkRefCnt INHERITED; 252 typedef SkRefCnt INHERITED;
250 }; 253 };
251 254
252 #endif 255 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698