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

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

Issue 774133003: Revert of create and thread batch tracker object (Closed) Base URL: https://skia.googlesource.com/skia.git@2_vertex_attr
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); } 85 bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get() ); }
86 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); } 86 const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryPr ocessor.get(); }
87 const GrBatchTracker& getBatchTracker() const { return fBatchTracker; }
88 87
89 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); } 88 const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get( ); }
90 89
91 const GrPendingFragmentStage& getColorStage(int idx) const { 90 const GrPendingFragmentStage& getColorStage(int idx) const {
92 SkASSERT(idx < this->numColorStages()); 91 SkASSERT(idx < this->numColorStages());
93 return fFragmentStages[idx]; 92 return fFragmentStages[idx];
94 } 93 }
95 const GrPendingFragmentStage& getCoverageStage(int idx) const { 94 const GrPendingFragmentStage& getCoverageStage(int idx) const {
96 SkASSERT(idx < this->numCoverageStages()); 95 SkASSERT(idx < this->numCoverageStages());
97 return fFragmentStages[fNumColorStages + idx]; 96 return fFragmentStages[fNumColorStages + idx];
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 SkMatrix fViewMatrix; 226 SkMatrix fViewMatrix;
228 GrColor fBlendConstant; 227 GrColor fBlendConstant;
229 GrStencilSettings fStencilSettings; 228 GrStencilSettings fStencilSettings;
230 uint8_t fCoverage; 229 uint8_t fCoverage;
231 GrDrawState::DrawFace fDrawFace; 230 GrDrawState::DrawFace fDrawFace;
232 GrDeviceCoordTexture fDstCopy; 231 GrDeviceCoordTexture fDstCopy;
233 GrBlendCoeff fSrcBlend; 232 GrBlendCoeff fSrcBlend;
234 GrBlendCoeff fDstBlend; 233 GrBlendCoeff fDstBlend;
235 uint32_t fFlags; 234 uint32_t fFlags;
236 ProgramGeometryProcessor fGeometryProcessor; 235 ProgramGeometryProcessor fGeometryProcessor;
237 GrBatchTracker fBatchTracker;
238 ProgramXferProcessor fXferProcessor; 236 ProgramXferProcessor fXferProcessor;
239 FragmentStageArray fFragmentStages; 237 FragmentStageArray fFragmentStages;
240 GrGpu::DrawType fDrawType; 238 GrGpu::DrawType fDrawType;
241 GrProgramDesc::DescInfo fDescInfo; 239 GrProgramDesc::DescInfo fDescInfo;
242 bool fFinalized; 240 bool fFinalized;
243 241
244 // 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.
245 int fNumColorStages; 243 int fNumColorStages;
246 244
247 GrProgramDesc fDesc; 245 GrProgramDesc fDesc;
248 246
249 typedef SkRefCnt INHERITED; 247 typedef SkRefCnt INHERITED;
250 }; 248 };
251 249
252 #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