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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 for (int i = 0; i < kNumStages; ++i) { | 444 for (int i = 0; i < kNumStages; ++i) { |
445 if (this->isStageEnabled(i)) { | 445 if (this->isStageEnabled(i)) { |
446 fStages[i].localCoordChange(oldToNew); | 446 fStages[i].localCoordChange(oldToNew); |
447 } | 447 } |
448 } | 448 } |
449 } | 449 } |
450 | 450 |
451 /** | 451 /** |
452 * Checks whether any of the effects will read the dst pixel color. | 452 * Checks whether any of the effects will read the dst pixel color. |
453 */ | 453 */ |
454 bool willEffectReadDstColor() const { | 454 bool willEffectReadDstColor() const; |
455 for (int s = 0; s < kNumStages; ++s) { | |
456 if (this->isStageEnabled(s) && (*this->getStage(s).getEffect())->wil
lReadDstColor()) { | |
457 return true; | |
458 } | |
459 } | |
460 return false; | |
461 } | |
462 | 455 |
463 /// @} | 456 /// @} |
464 | 457 |
465 /////////////////////////////////////////////////////////////////////////// | 458 /////////////////////////////////////////////////////////////////////////// |
466 /// @name Coverage / Color Stages | 459 /// @name Coverage / Color Stages |
467 //// | 460 //// |
468 | 461 |
469 /** | 462 /** |
470 * A common pattern is to compute a color with the initial stages and then | 463 * A common pattern is to compute a color with the initial stages and then |
471 * modulate that color by a coverage value in later stage(s) (AA, mask- | 464 * modulate that color by a coverage value in later stage(s) (AA, mask- |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. | 1151 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. |
1159 */ | 1152 */ |
1160 void setVertexAttribs(const GrVertexAttrib attribs[], int count); | 1153 void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
1161 | 1154 |
1162 typedef GrRefCnt INHERITED; | 1155 typedef GrRefCnt INHERITED; |
1163 }; | 1156 }; |
1164 | 1157 |
1165 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 1158 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
1166 | 1159 |
1167 #endif | 1160 #endif |
OLD | NEW |