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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 13296005: Revise attribute binding interface (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix fExperimentalGS in GrGLProgramDesc Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
===================================================================
--- src/gpu/GrDrawTarget.cpp (revision 8462)
+++ src/gpu/GrDrawTarget.cpp (working copy)
@@ -615,18 +615,15 @@
const SkMatrix* matrix,
const GrRect* localRect,
const SkMatrix* localMatrix) {
- GrAttribBindings bindings = 0;
// position + (optional) texture coord
static const GrVertexAttrib kAttribs[] = {
- {kVec2f_GrVertexAttribType, 0},
- {kVec2f_GrVertexAttribType, sizeof(GrPoint)}
+ {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBinding},
+ {kVec2f_GrVertexAttribType, sizeof(GrPoint), kLocalCoord_GrVertexAttribBinding}
};
int attribCount = 1;
if (NULL != localRect) {
- bindings |= GrDrawState::kLocalCoords_AttribBindingsBit;
attribCount = 2;
- this->drawState()->setAttribIndex(GrDrawState::kLocalCoords_AttribIndex, 1);
}
GrDrawState::AutoViewMatrixRestore avmr;
@@ -635,8 +632,6 @@
}
this->drawState()->setVertexAttribs(kAttribs, attribCount);
- this->drawState()->setAttribIndex(GrDrawState::kPosition_AttribIndex, 0);
- this->drawState()->setAttribBindings(bindings);
AutoReleaseGeometry geo(this, 4, 0);
if (!geo.succeeded()) {
GrPrintf("Failed to get space for vertices!\n");
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698