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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.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 | « no previous file | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index f76acc6907b65242d423f2e749791af98f7ef34a..6268906bea681cabf74c293e7424926f186144a7 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -234,14 +234,13 @@ private:
bool hasTransformedLocalCoords = SkToBool(gpTypeFlags & kTransformedLocalCoord_GPFlag);
bool hasLocalCoord = hasExplicitLocalCoords || hasTransformedLocalCoords;
bool hasCoverage = SkToBool(gpTypeFlags & kCoverage_GPFlag);
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType,
- kHigh_GrSLPrecision));
+ fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
+ kHigh_GrSLPrecision);
if (hasColor) {
- fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexAttribType));
+ fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
}
if (hasLocalCoord) {
- fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord",
- kVec2f_GrVertexAttribType));
+ fInLocalCoords = &this->addVertexAttrib("inLocalCoord", kVec2f_GrVertexAttribType);
if (hasExplicitLocalCoords) {
this->setHasExplicitLocalCoords();
} else {
@@ -250,8 +249,7 @@ private:
}
}
if (hasCoverage) {
- fInCoverage = &this->addVertexAttrib(Attribute("inCoverage",
- kFloat_GrVertexAttribType));
+ fInCoverage = &this->addVertexAttrib("inCoverage", kFloat_GrVertexAttribType);
}
}
« no previous file with comments | « no previous file | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698