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

Unified Diff: src/gpu/batches/GrPLSPathRenderer.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/GrMSAAPathRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrPLSPathRenderer.cpp
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index fa0bd90ca9b065a6df620933afeb0c9edc4effdf..81009a6a3cf9060ebad58e6734b2ad6f31adacd8 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -421,16 +421,16 @@ private:
: fLocalMatrix(localMatrix)
, fUsesLocalCoords(usesLocalCoords) {
this->initClassID<PLSAATriangleEffect>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInVertex1 = &this->addVertexAttrib(Attribute("inVertex1", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInVertex2 = &this->addVertexAttrib(Attribute("inVertex2", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInVertex3 = &this->addVertexAttrib(Attribute("inVertex3", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInWindings = &this->addVertexAttrib(Attribute("inWindings", kInt_GrVertexAttribType,
- kLow_GrSLPrecision));
+ fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInVertex1 = &this->addVertexAttrib("inVertex1", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInVertex2 = &this->addVertexAttrib("inVertex2", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInVertex3 = &this->addVertexAttrib("inVertex3", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInWindings = &this->addVertexAttrib("inWindings", kInt_GrVertexAttribType,
+ kLow_GrSLPrecision);
this->setWillReadFragmentPosition();
}
@@ -611,16 +611,15 @@ private:
: fLocalMatrix(localMatrix)
, fUsesLocalCoords(usesLocalCoords) {
this->initClassID<PLSQuadEdgeEffect>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInUV = &this->addVertexAttrib(Attribute("inUV", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInEndpoint1 = &this->addVertexAttrib(Attribute("inEndpoint1", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInEndpoint2 = &this->addVertexAttrib(Attribute("inEndpoint2", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
- fInWindings = &this->addVertexAttrib(Attribute("inWindings", kInt_GrVertexAttribType,
- kLow_GrSLPrecision));
+ fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInUV = &this->addVertexAttrib("inUV", kVec2f_GrVertexAttribType, kHigh_GrSLPrecision);
+ fInEndpoint1 = &this->addVertexAttrib("inEndpoint1", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInEndpoint2 = &this->addVertexAttrib("inEndpoint2", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
+ fInWindings = &this->addVertexAttrib("inWindings", kInt_GrVertexAttribType,
+ kLow_GrSLPrecision);
this->setWillReadFragmentPosition();
}
@@ -762,8 +761,8 @@ private:
, fLocalMatrix(localMatrix)
, fUsesLocalCoords(usesLocalCoords) {
this->initClassID<PLSFinishEffect>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
+ fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
}
const Attribute* fInPosition;
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698