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

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

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