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

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

Issue 163913007: Implement support for CHROMIUM_NV_path_rendering pseudo extension (Closed) Base URL: https://skia.googlesource.com/skia.git@nv-pr-00-use-attribs
Patch Set: rebase Created 6 years, 8 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/gl/GrGLShaderBuilder.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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 GrCrash("Unknown geometry src type!"); 336 GrCrash("Unknown geometry src type!");
337 } 337 }
338 338
339 SkASSERT(NULL != ibuf); 339 SkASSERT(NULL != ibuf);
340 SkASSERT(!ibuf->isLocked()); 340 SkASSERT(!ibuf->isLocked());
341 *indexOffsetInBytes += ibuf->baseOffset(); 341 *indexOffsetInBytes += ibuf->baseOffset();
342 } 342 }
343 GrGLAttribArrayState* attribState = 343 GrGLAttribArrayState* attribState =
344 fHWGeometryState.bindArrayAndBuffersToDraw(this, vbuf, ibuf); 344 fHWGeometryState.bindArrayAndBuffersToDraw(this, vbuf, ibuf);
345 345
346 uint32_t usedAttribArraysMask = 0;
346 if (fCurrentProgram->hasVertexShader()) { 347 if (fCurrentProgram->hasVertexShader()) {
347 int vertexAttribCount = this->getDrawState().getVertexAttribCount(); 348 int vertexAttribCount = this->getDrawState().getVertexAttribCount();
348 uint32_t usedAttribArraysMask = 0;
349 const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttri bs(); 349 const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttri bs();
350 350
351 for (int vertexAttribIndex = 0; vertexAttribIndex < vertexAttribCount; 351 for (int vertexAttribIndex = 0; vertexAttribIndex < vertexAttribCount;
352 ++vertexAttribIndex, ++vertexAttrib) { 352 ++vertexAttribIndex, ++vertexAttrib) {
353 353
354 usedAttribArraysMask |= (1 << vertexAttribIndex); 354 usedAttribArraysMask |= (1 << vertexAttribIndex);
355 GrVertexAttribType attribType = vertexAttrib->fType; 355 GrVertexAttribType attribType = vertexAttrib->fType;
356 attribState->set(this, 356 attribState->set(this,
357 vertexAttribIndex, 357 vertexAttribIndex,
358 vbuf, 358 vbuf,
359 GrGLAttribTypeToLayout(attribType).fCount, 359 GrGLAttribTypeToLayout(attribType).fCount,
360 GrGLAttribTypeToLayout(attribType).fType, 360 GrGLAttribTypeToLayout(attribType).fType,
361 GrGLAttribTypeToLayout(attribType).fNormalized, 361 GrGLAttribTypeToLayout(attribType).fNormalized,
362 stride, 362 stride,
363 reinterpret_cast<GrGLvoid*>( 363 reinterpret_cast<GrGLvoid*>(
364 vertexOffsetInBytes + vertexAttrib->fOffset)); 364 vertexOffsetInBytes + vertexAttrib->fOffset));
365 } 365 }
366 attribState->disableUnusedArrays(this, usedAttribArraysMask);
367 } 366 }
367 attribState->disableUnusedArrays(this, usedAttribArraysMask);
368 } 368 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698