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

Side by Side Diff: src/gpu/gl/GrGpuGL.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t 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 | « src/gpu/gl/GrGpuGL.h ('k') | src/ports/SkFontHost_win_dw.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 8
9 #include "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 rt->config(), 1142 rt->config(),
1143 glsb->format()); 1143 glsb->format());
1144 } 1144 }
1145 } 1145 }
1146 return true; 1146 return true;
1147 } 1147 }
1148 } 1148 }
1149 1149
1150 //////////////////////////////////////////////////////////////////////////////// 1150 ////////////////////////////////////////////////////////////////////////////////
1151 1151
1152 GrVertexBuffer* GrGpuGL::onCreateVertexBuffer(uint32_t size, bool dynamic) { 1152 GrVertexBuffer* GrGpuGL::onCreateVertexBuffer(size_t size, bool dynamic) {
1153 GrGLVertexBuffer::Desc desc; 1153 GrGLVertexBuffer::Desc desc;
1154 desc.fDynamic = dynamic; 1154 desc.fDynamic = dynamic;
1155 desc.fSizeInBytes = size; 1155 desc.fSizeInBytes = size;
1156 desc.fIsWrapped = false; 1156 desc.fIsWrapped = false;
1157 1157
1158 if (this->glCaps().useNonVBOVertexAndIndexDynamicData() && desc.fDynamic) { 1158 if (this->glCaps().useNonVBOVertexAndIndexDynamicData() && desc.fDynamic) {
1159 desc.fID = 0; 1159 desc.fID = 0;
1160 GrGLVertexBuffer* vertexBuffer = SkNEW_ARGS(GrGLVertexBuffer, (this, des c)); 1160 GrGLVertexBuffer* vertexBuffer = SkNEW_ARGS(GrGLVertexBuffer, (this, des c));
1161 return vertexBuffer; 1161 return vertexBuffer;
1162 } else { 1162 } else {
(...skipping 12 matching lines...) Expand all
1175 this->notifyVertexBufferDelete(desc.fID); 1175 this->notifyVertexBufferDelete(desc.fID);
1176 return NULL; 1176 return NULL;
1177 } 1177 }
1178 GrGLVertexBuffer* vertexBuffer = SkNEW_ARGS(GrGLVertexBuffer, (this, desc)); 1178 GrGLVertexBuffer* vertexBuffer = SkNEW_ARGS(GrGLVertexBuffer, (this, desc));
1179 return vertexBuffer; 1179 return vertexBuffer;
1180 } 1180 }
1181 return NULL; 1181 return NULL;
1182 } 1182 }
1183 } 1183 }
1184 1184
1185 GrIndexBuffer* GrGpuGL::onCreateIndexBuffer(uint32_t size, bool dynamic) { 1185 GrIndexBuffer* GrGpuGL::onCreateIndexBuffer(size_t size, bool dynamic) {
1186 GrGLIndexBuffer::Desc desc; 1186 GrGLIndexBuffer::Desc desc;
1187 desc.fDynamic = dynamic; 1187 desc.fDynamic = dynamic;
1188 desc.fSizeInBytes = size; 1188 desc.fSizeInBytes = size;
1189 desc.fIsWrapped = false; 1189 desc.fIsWrapped = false;
1190 1190
1191 if (this->glCaps().useNonVBOVertexAndIndexDynamicData() && desc.fDynamic) { 1191 if (this->glCaps().useNonVBOVertexAndIndexDynamicData() && desc.fDynamic) {
1192 desc.fID = 0; 1192 desc.fID = 0;
1193 GrIndexBuffer* indexBuffer = SkNEW_ARGS(GrGLIndexBuffer, (this, desc)); 1193 GrIndexBuffer* indexBuffer = SkNEW_ARGS(GrGLIndexBuffer, (this, desc));
1194 return indexBuffer; 1194 return indexBuffer;
1195 } else { 1195 } else {
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 this->setVertexArrayID(gpu, 0); 2672 this->setVertexArrayID(gpu, 0);
2673 } 2673 }
2674 int attrCount = gpu->glCaps().maxVertexAttributes(); 2674 int attrCount = gpu->glCaps().maxVertexAttributes();
2675 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2675 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2676 fDefaultVertexArrayAttribState.resize(attrCount); 2676 fDefaultVertexArrayAttribState.resize(attrCount);
2677 } 2677 }
2678 attribState = &fDefaultVertexArrayAttribState; 2678 attribState = &fDefaultVertexArrayAttribState;
2679 } 2679 }
2680 return attribState; 2680 return attribState;
2681 } 2681 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698