aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDefaultGeoProcFactory.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-08-17 11:33:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-17 11:33:39 -0700
commit6cb807bf99ac0f8f166e1790f91bcb3afbfb5458 (patch)
tree8bb54651a6a9b1a6c018c52fcf285fd995276599 /src/gpu/GrDefaultGeoProcFactory.cpp
parent9da5dbdda3aec9875cdaa05c1815b4d8c17cb130 (diff)
Simplify adding attributes to GrGeometryProcessor
Diffstat (limited to 'src/gpu/GrDefaultGeoProcFactory.cpp')
-rw-r--r--src/gpu/GrDefaultGeoProcFactory.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index f76acc6907..6268906bea 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);
}
}