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

Unified Diff: src/gpu/instanced/InstanceProcessor.cpp

Issue 2248323003: Simplify adding attributes to GrGeometryProcessor (Closed) Base URL: https://chromium.googlesource.com/skia.git@xformhelper
Patch Set: Revert removal of fAttribNames Created 4 years, 4 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/effects/GrDistanceFieldGeoProc.cpp ('k') | tests/PrimitiveProcessorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/instanced/InstanceProcessor.cpp
diff --git a/src/gpu/instanced/InstanceProcessor.cpp b/src/gpu/instanced/InstanceProcessor.cpp
index 50bc219087dfb26d8a8a39895c56152e02641787..2b05ec1683776b305e72ff3f7d12e8f6d6163bfe 100644
--- a/src/gpu/instanced/InstanceProcessor.cpp
+++ b/src/gpu/instanced/InstanceProcessor.cpp
@@ -44,15 +44,13 @@ InstanceProcessor::InstanceProcessor(BatchInfo batchInfo, GrBuffer* paramsBuffer
: fBatchInfo(batchInfo) {
this->initClassID<InstanceProcessor>();
- this->addVertexAttrib(Attribute("shapeCoords", kVec2f_GrVertexAttribType, kHigh_GrSLPrecision));
- this->addVertexAttrib(Attribute("vertexAttrs", kInt_GrVertexAttribType));
- this->addVertexAttrib(Attribute("instanceInfo", kUint_GrVertexAttribType));
- this->addVertexAttrib(Attribute("shapeMatrixX", kVec3f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- this->addVertexAttrib(Attribute("shapeMatrixY", kVec3f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- this->addVertexAttrib(Attribute("color", kVec4f_GrVertexAttribType, kLow_GrSLPrecision));
- this->addVertexAttrib(Attribute("localRect", kVec4f_GrVertexAttribType, kHigh_GrSLPrecision));
+ this->addVertexAttrib("shapeCoords", kVec2f_GrVertexAttribType, kHigh_GrSLPrecision);
+ this->addVertexAttrib("vertexAttrs", kInt_GrVertexAttribType);
+ this->addVertexAttrib("instanceInfo", kUint_GrVertexAttribType);
+ this->addVertexAttrib("shapeMatrixX", kVec3f_GrVertexAttribType, kHigh_GrSLPrecision);
+ this->addVertexAttrib("shapeMatrixY", kVec3f_GrVertexAttribType, kHigh_GrSLPrecision);
+ this->addVertexAttrib("color", kVec4f_GrVertexAttribType, kLow_GrSLPrecision);
+ this->addVertexAttrib("localRect", kVec4f_GrVertexAttribType, kHigh_GrSLPrecision);
GR_STATIC_ASSERT(0 == (int)Attrib::kShapeCoords);
GR_STATIC_ASSERT(1 == (int)Attrib::kVertexAttrs);
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.cpp ('k') | tests/PrimitiveProcessorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698