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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 } | 277 } |
278 // This must come after textures are flushed because a texture may need | 278 // This must come after textures are flushed because a texture may need |
279 // to be msaa-resolved (which will modify bound FBO state). | 279 // to be msaa-resolved (which will modify bound FBO state). |
280 this->flushRenderTarget(devRect); | 280 this->flushRenderTarget(devRect); |
281 | 281 |
282 return true; | 282 return true; |
283 } | 283 } |
284 | 284 |
285 void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) { | 285 void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) { |
286 | 286 |
287 GrGLsizei stride = static_cast<GrGLsizei>(this->getDrawState().getVertexStri
de()); | 287 GrGLsizei stride = static_cast<GrGLsizei>(this->getDrawState().getVertexSize
()); |
288 | 288 |
289 size_t vertexOffsetInBytes = stride * info.startVertex(); | 289 size_t vertexOffsetInBytes = stride * info.startVertex(); |
290 | 290 |
291 const GeometryPoolState& geoPoolState = this->getGeomPoolState(); | 291 const GeometryPoolState& geoPoolState = this->getGeomPoolState(); |
292 | 292 |
293 GrGLVertexBuffer* vbuf; | 293 GrGLVertexBuffer* vbuf; |
294 switch (this->getGeomSrc().fVertexSrc) { | 294 switch (this->getGeomSrc().fVertexSrc) { |
295 case kBuffer_GeometrySrcType: | 295 case kBuffer_GeometrySrcType: |
296 vbuf = (GrGLVertexBuffer*) this->getGeomSrc().fVertexBuffer; | 296 vbuf = (GrGLVertexBuffer*) this->getGeomSrc().fVertexBuffer; |
297 break; | 297 break; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 GrGLAttribTypeToLayout(attribType).fType, | 357 GrGLAttribTypeToLayout(attribType).fType, |
358 GrGLAttribTypeToLayout(attribType).fNormalized, | 358 GrGLAttribTypeToLayout(attribType).fNormalized, |
359 stride, | 359 stride, |
360 reinterpret_cast<GrGLvoid*>( | 360 reinterpret_cast<GrGLvoid*>( |
361 vertexOffsetInBytes + vertexAttrib->fOffset)); | 361 vertexOffsetInBytes + vertexAttrib->fOffset)); |
362 } | 362 } |
363 } | 363 } |
364 attribState->disableUnusedArrays(this, usedAttribArraysMask); | 364 attribState->disableUnusedArrays(this, usedAttribArraysMask); |
365 } | 365 } |
366 } | 366 } |
OLD | NEW |