OLD | NEW |
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 Loading... |
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 SkMatrix fViewMatrix; | 241 SkMatrix fViewMatrix; |
241 GrColor fBlendConstant; | 242 GrColor fBlendConstant; |
242 GrStencilSettings fStencilSettings; | 243 GrStencilSettings fStencilSettings; |
243 uint8_t fCoverage; | 244 uint8_t fCoverage; |
244 GrDrawState::DrawFace fDrawFace; | 245 GrDrawState::DrawFace fDrawFace; |
245 GrDeviceCoordTexture fDstCopy; | 246 GrDeviceCoordTexture fDstCopy; |
246 GrBlendCoeff fSrcBlend; | 247 GrBlendCoeff fSrcBlend; |
247 GrBlendCoeff fDstBlend; | 248 GrBlendCoeff fDstBlend; |
248 uint32_t fFlags; | 249 uint32_t fFlags; |
249 ProgramGeometryProcessor fGeometryProcessor; | 250 ProgramGeometryProcessor fGeometryProcessor; |
| 251 GrBatchTracker fBatchTracker; |
250 ProgramXferProcessor fXferProcessor; | 252 ProgramXferProcessor fXferProcessor; |
251 FragmentStageArray fFragmentStages; | 253 FragmentStageArray fFragmentStages; |
252 | 254 |
253 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. | 255 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. |
254 int fNumColorStages; | 256 int fNumColorStages; |
255 | 257 |
256 GrProgramDesc fDesc; | 258 GrProgramDesc fDesc; |
257 | 259 |
258 typedef SkRefCnt INHERITED; | 260 typedef SkRefCnt INHERITED; |
259 }; | 261 }; |
260 | 262 |
261 #endif | 263 #endif |
OLD | NEW |