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

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

Issue 502533004: Revert of Make setVertexAttribs in GrDrawState take a stride parameter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('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 #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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698