| 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 const GrPendingFragmentStage& getColorStage(int idx) const { | 88 const GrPendingFragmentStage& getColorStage(int idx) const { |
| 88 SkASSERT(idx < this->numColorStages()); | 89 SkASSERT(idx < this->numColorStages()); |
| 89 return fFragmentStages[idx]; | 90 return fFragmentStages[idx]; |
| 90 } | 91 } |
| 91 const GrPendingFragmentStage& getCoverageStage(int idx) const { | 92 const GrPendingFragmentStage& getCoverageStage(int idx) const { |
| 92 SkASSERT(idx < this->numCoverageStages()); | 93 SkASSERT(idx < this->numCoverageStages()); |
| 93 return fFragmentStages[fNumColorStages + idx]; | 94 return fFragmentStages[fNumColorStages + idx]; |
| 94 } | 95 } |
| 95 const GrPendingFragmentStage& getFragmentStage(int idx) const { | 96 const GrPendingFragmentStage& getFragmentStage(int idx) const { |
| 96 return fFragmentStages[idx]; | 97 return fFragmentStages[idx]; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 SkMatrix fViewMatrix; | 237 SkMatrix fViewMatrix; |
| 237 GrColor fBlendConstant; | 238 GrColor fBlendConstant; |
| 238 GrStencilSettings fStencilSettings; | 239 GrStencilSettings fStencilSettings; |
| 239 uint8_t fCoverage; | 240 uint8_t fCoverage; |
| 240 GrDrawState::DrawFace fDrawFace; | 241 GrDrawState::DrawFace fDrawFace; |
| 241 GrDeviceCoordTexture fDstCopy; | 242 GrDeviceCoordTexture fDstCopy; |
| 242 GrBlendCoeff fSrcBlend; | 243 GrBlendCoeff fSrcBlend; |
| 243 GrBlendCoeff fDstBlend; | 244 GrBlendCoeff fDstBlend; |
| 244 uint32_t fFlags; | 245 uint32_t fFlags; |
| 245 ProgramGeometryProcessor fGeometryProcessor; | 246 ProgramGeometryProcessor fGeometryProcessor; |
| 247 GrBatchTracker fBatchTracker; |
| 246 FragmentStageArray fFragmentStages; | 248 FragmentStageArray fFragmentStages; |
| 247 | 249 |
| 248 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. | 250 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. |
| 249 int fNumColorStages; | 251 int fNumColorStages; |
| 250 | 252 |
| 251 GrProgramDesc fDesc; | 253 GrProgramDesc fDesc; |
| 252 | 254 |
| 253 typedef SkRefCnt INHERITED; | 255 typedef SkRefCnt INHERITED; |
| 254 }; | 256 }; |
| 255 | 257 |
| 256 #endif | 258 #endif |
| OLD | NEW |