Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: src/gpu/GrDrawState.h

Issue 16406006: Improve batching of drawBitmap* calls (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review issues Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/gpu/GrEffectStage.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/gpu/GrEffectStage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698