| 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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 for (int i = 0; i < kNumStages; ++i) { | 1055 for (int i = 0; i < kNumStages; ++i) { |
| 1056 fStages[i].restoreTo(&drawState->fStages[i]); | 1056 fStages[i].restoreTo(&drawState->fStages[i]); |
| 1057 } | 1057 } |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 bool isEqual(const GrDrawState& state) const { | 1060 bool isEqual(const GrDrawState& state) const { |
| 1061 if (fRenderTarget != state.fRenderTarget.get() || fCommon != state.f
Common) { | 1061 if (fRenderTarget != state.fRenderTarget.get() || fCommon != state.f
Common) { |
| 1062 return false; | 1062 return false; |
| 1063 } | 1063 } |
| 1064 for (int i = 0; i < kNumStages; ++i) { | 1064 for (int i = 0; i < kNumStages; ++i) { |
| 1065 if (!fStages[i].isEqual(state.fStages[i])) { | 1065 if (!fStages[i].isEqual(state.fStages[i], state.hasLocalCoordAtt
ribute())) { |
| 1066 return false; | 1066 return false; |
| 1067 } | 1067 } |
| 1068 } | 1068 } |
| 1069 return true; | 1069 return true; |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 private: | 1072 private: |
| 1073 GrRenderTarget* fRenderTarget; | 1073 GrRenderTarget* fRenderTarget; |
| 1074 CommonState fCommon; | 1074 CommonState fCommon; |
| 1075 GrEffectStage::DeferredStage fStages[kNumStages]; | 1075 GrEffectStage::DeferredStage fStages[kNumStages]; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1090 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. | 1090 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. |
| 1091 */ | 1091 */ |
| 1092 void setVertexAttribs(const GrVertexAttrib attribs[], int count); | 1092 void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
| 1093 | 1093 |
| 1094 typedef GrRefCnt INHERITED; | 1094 typedef GrRefCnt INHERITED; |
| 1095 }; | 1095 }; |
| 1096 | 1096 |
| 1097 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 1097 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
| 1098 | 1098 |
| 1099 #endif | 1099 #endif |
| OLD | NEW |