| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED |
| 9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED |
| 10 | 10 |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 SkDEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;) | 404 SkDEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;) |
| 405 } | 405 } |
| 406 fDrawState = ds; | 406 fDrawState = ds; |
| 407 if (NULL != ds) { | 407 if (NULL != ds) { |
| 408 fColorEffectCnt = ds->fColorStages.count(); | 408 fColorEffectCnt = ds->fColorStages.count(); |
| 409 fCoverageEffectCnt = ds->fCoverageStages.count(); | 409 fCoverageEffectCnt = ds->fCoverageStages.count(); |
| 410 SkDEBUGCODE(++ds->fBlockEffectRemovalCnt;) | 410 SkDEBUGCODE(++ds->fBlockEffectRemovalCnt;) |
| 411 } | 411 } |
| 412 } | 412 } |
| 413 | 413 |
| 414 bool isSet() const { return NULL != fDrawState; } |
| 415 |
| 414 private: | 416 private: |
| 415 GrDrawState* fDrawState; | 417 GrDrawState* fDrawState; |
| 416 int fColorEffectCnt; | 418 int fColorEffectCnt; |
| 417 int fCoverageEffectCnt; | 419 int fCoverageEffectCnt; |
| 418 }; | 420 }; |
| 419 | 421 |
| 420 int numColorStages() const { return fColorStages.count(); } | 422 int numColorStages() const { return fColorStages.count(); } |
| 421 int numCoverageStages() const { return fCoverageStages.count(); } | 423 int numCoverageStages() const { return fCoverageStages.count(); } |
| 422 int numTotalStages() const { return this->numColorStages() + this->numCovera
geStages(); } | 424 int numTotalStages() const { return this->numColorStages() + this->numCovera
geStages(); } |
| 423 | 425 |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. | 1054 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. |
| 1053 */ | 1055 */ |
| 1054 void setVertexAttribs(const GrVertexAttrib attribs[], int count); | 1056 void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
| 1055 | 1057 |
| 1056 typedef SkRefCnt INHERITED; | 1058 typedef SkRefCnt INHERITED; |
| 1057 }; | 1059 }; |
| 1058 | 1060 |
| 1059 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 1061 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
| 1060 | 1062 |
| 1061 #endif | 1063 #endif |
| OLD | NEW |