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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 13296005: Revise attribute binding interface (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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
Index: src/gpu/GrDrawTarget.cpp
===================================================================
--- src/gpu/GrDrawTarget.cpp (revision 8436)
+++ src/gpu/GrDrawTarget.cpp (working copy)
@@ -532,18 +532,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;
@@ -552,8 +549,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");

Powered by Google App Engine
This is Rietveld 408576698