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

Unified Diff: src/gpu/batches/GrAnalyticRectBatch.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/batches/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAnalyticRectBatch.cpp
diff --git a/src/gpu/batches/GrAnalyticRectBatch.cpp b/src/gpu/batches/GrAnalyticRectBatch.cpp
index b3ff50f452e141995774f7d0a8ded076173f3b7c..af3b9fa9d06597feefc27e7c33c0115bc3b24381 100644
--- a/src/gpu/batches/GrAnalyticRectBatch.cpp
+++ b/src/gpu/batches/GrAnalyticRectBatch.cpp
@@ -55,12 +55,11 @@ class RectGeometryProcessor : public GrGeometryProcessor {
public:
RectGeometryProcessor(const SkMatrix& localMatrix) : fLocalMatrix(localMatrix) {
this->initClassID<RectGeometryProcessor>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexAttribType));
- fInRectEdge = &this->addVertexAttrib(Attribute("inRectEdge", kVec4f_GrVertexAttribType));
- fInWidthHeight = &this->addVertexAttrib(Attribute("inWidthHeight",
- kVec2f_GrVertexAttribType));
+ fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
+ fInRectEdge = &this->addVertexAttrib("inRectEdge", kVec4f_GrVertexAttribType);
+ fInWidthHeight = &this->addVertexAttrib("inWidthHeight", kVec2f_GrVertexAttribType);
}
bool implementsDistanceVector() const override { return true; };
« no previous file with comments | « src/gpu/batches/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698