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 #include "GrGpuGL.h" | 8 #include "GrGpuGL.h" |
9 | 9 |
10 #include "GrEffect.h" | 10 #include "GrEffect.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 // This must come after textures are flushed because a texture may need | 285 // This must come after textures are flushed because a texture may need |
286 // to be msaa-resolved (which will modify bound FBO state). | 286 // to be msaa-resolved (which will modify bound FBO state). |
287 this->flushRenderTarget(devRect); | 287 this->flushRenderTarget(devRect); |
288 | 288 |
289 return true; | 289 return true; |
290 } | 290 } |
291 | 291 |
292 void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) { | 292 void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) { |
293 | 293 |
294 GrGLsizei stride = this->getDrawState().getVertexSize(); | 294 GrGLsizei stride = static_cast<GrGLsizei>(this->getDrawState().getVertexSize
()); |
295 | 295 |
296 size_t vertexOffsetInBytes = stride * info.startVertex(); | 296 size_t vertexOffsetInBytes = stride * info.startVertex(); |
297 | 297 |
298 const GeometryPoolState& geoPoolState = this->getGeomPoolState(); | 298 const GeometryPoolState& geoPoolState = this->getGeomPoolState(); |
299 | 299 |
300 GrGLVertexBuffer* vbuf; | 300 GrGLVertexBuffer* vbuf; |
301 switch (this->getGeomSrc().fVertexSrc) { | 301 switch (this->getGeomSrc().fVertexSrc) { |
302 case kBuffer_GeometrySrcType: | 302 case kBuffer_GeometrySrcType: |
303 vbuf = (GrGLVertexBuffer*) this->getGeomSrc().fVertexBuffer; | 303 vbuf = (GrGLVertexBuffer*) this->getGeomSrc().fVertexBuffer; |
304 break; | 304 break; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 GrGLAttribTypeToLayout(attribType).fType, | 374 GrGLAttribTypeToLayout(attribType).fType, |
375 GrGLAttribTypeToLayout(attribType).fNormalized, | 375 GrGLAttribTypeToLayout(attribType).fNormalized, |
376 stride, | 376 stride, |
377 reinterpret_cast<GrGLvoid*>( | 377 reinterpret_cast<GrGLvoid*>( |
378 vertexOffsetInBytes + vertexAttrib->fOffset)); | 378 vertexOffsetInBytes + vertexAttrib->fOffset)); |
379 } | 379 } |
380 | 380 |
381 attribState->disableUnusedArrays(this, usedAttribArraysMask, false); | 381 attribState->disableUnusedArrays(this, usedAttribArraysMask, false); |
382 } | 382 } |
383 } | 383 } |
OLD | NEW |