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

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

Issue 791143002: Fix to set correct output type when blending when we've read dst (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merging follow up fix cls 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 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0); 82 // the + 1 at the end is for the xferProcessor which will always be pres ent
83 return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0 ) + 1;
83 } 84 }
84 85
85 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } 86 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); }
86 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } 87 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); }
87 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; } 88 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; }
88 89
89 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); } 90 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); }
90 91
91 const GrPendingFragmentStage& getColorStage(int idx) const { 92 const GrPendingFragmentStage& getColorStage(int idx) const {
92 SkASSERT(idx < this->numColorStages()); 93 SkASSERT(idx < this->numColorStages());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 242
242 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin. 243 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin.
243 int fNumColorStages; 244 int fNumColorStages;
244 245
245 GrProgramDesc fDesc; 246 GrProgramDesc fDesc;
246 247
247 typedef SkRefCnt INHERITED; 248 typedef SkRefCnt INHERITED;
248 }; 249 };
249 250
250 #endif 251 #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