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

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

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleanup Created 7 years, 2 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/GrTypes.h ('k') | src/gpu/GrDrawState.cpp » ('j') | 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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1007
1008 void restoreTo(GrDrawState* drawState) { 1008 void restoreTo(GrDrawState* drawState) {
1009 SkASSERT(fInitialized); 1009 SkASSERT(fInitialized);
1010 drawState->fCommon = fCommon; 1010 drawState->fCommon = fCommon;
1011 drawState->setRenderTarget(fRenderTarget); 1011 drawState->setRenderTarget(fRenderTarget);
1012 // reinflate color/cov stage arrays. 1012 // reinflate color/cov stage arrays.
1013 drawState->fColorStages.reset(); 1013 drawState->fColorStages.reset();
1014 for (int i = 0; i < fColorStageCnt; ++i) { 1014 for (int i = 0; i < fColorStageCnt; ++i) {
1015 SkNEW_APPEND_TO_TARRAY(&drawState->fColorStages, GrEffectStage, (fStages[i])); 1015 SkNEW_APPEND_TO_TARRAY(&drawState->fColorStages, GrEffectStage, (fStages[i]));
1016 } 1016 }
1017 int coverageStageCnt = fStages.count() - fColorStageCnt; 1017 int coverageStageCnt = int(fStages.count()) - fColorStageCnt;
bsalomon 2013/10/14 15:17:02 I think we conventionally write this cast as (int)
robertphillips 2013/10/14 17:39:26 Done.
1018 drawState->fCoverageStages.reset(); 1018 drawState->fCoverageStages.reset();
1019 for (int i = 0; i < coverageStageCnt; ++i) { 1019 for (int i = 0; i < coverageStageCnt; ++i) {
1020 SkNEW_APPEND_TO_TARRAY(&drawState->fCoverageStages, 1020 SkNEW_APPEND_TO_TARRAY(&drawState->fCoverageStages,
1021 GrEffectStage, (fStages[i + fColorStageC nt])); 1021 GrEffectStage, (fStages[i + fColorStageC nt]));
1022 } 1022 }
1023 } 1023 }
1024 1024
1025 bool isEqual(const GrDrawState& state) const { 1025 bool isEqual(const GrDrawState& state) const {
1026 int numCoverageStages = fStages.count() - fColorStageCnt; 1026 int numCoverageStages = int(fStages.count()) - fColorStageCnt;
1027 if (fRenderTarget != state.fRenderTarget.get() || 1027 if (fRenderTarget != state.fRenderTarget.get() ||
1028 fColorStageCnt != state.fColorStages.count() || 1028 fColorStageCnt != state.fColorStages.count() ||
1029 numCoverageStages != state.fCoverageStages.count() || 1029 numCoverageStages != state.fCoverageStages.count() ||
1030 fCommon != state.fCommon) { 1030 fCommon != state.fCommon) {
1031 return false; 1031 return false;
1032 } 1032 }
1033 bool explicitLocalCoords = state.hasLocalCoordAttribute(); 1033 bool explicitLocalCoords = state.hasLocalCoordAttribute();
1034 for (int i = 0; i < fColorStageCnt; ++i) { 1034 for (int i = 0; i < fColorStageCnt; ++i) {
1035 if (!fStages[i].isEqual(state.fColorStages[i], explicitLocalCoor ds)) { 1035 if (!fStages[i].isEqual(state.fColorStages[i], explicitLocalCoor ds)) {
1036 return false; 1036 return false;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 * @param count the number of attributes being set, limited to kMaxVer texAttribCnt. 1076 * @param count the number of attributes being set, limited to kMaxVer texAttribCnt.
1077 */ 1077 */
1078 void setVertexAttribs(const GrVertexAttrib attribs[], int count); 1078 void setVertexAttribs(const GrVertexAttrib attribs[], int count);
1079 1079
1080 typedef SkRefCnt INHERITED; 1080 typedef SkRefCnt INHERITED;
1081 }; 1081 };
1082 1082
1083 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 1083 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
1084 1084
1085 #endif 1085 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698