diff options
author | bsalomon <bsalomon@google.com> | 2016-08-17 11:33:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-17 11:33:39 -0700 |
commit | 6cb807bf99ac0f8f166e1790f91bcb3afbfb5458 (patch) | |
tree | 8bb54651a6a9b1a6c018c52fcf285fd995276599 /src/gpu/GrDefaultGeoProcFactory.cpp | |
parent | 9da5dbdda3aec9875cdaa05c1815b4d8c17cb130 (diff) |
Simplify adding attributes to GrGeometryProcessor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248323003
Review-Url: https://codereview.chromium.org/2248323003
Diffstat (limited to 'src/gpu/GrDefaultGeoProcFactory.cpp')
-rw-r--r-- | src/gpu/GrDefaultGeoProcFactory.cpp | 12 |
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); } } |