diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-09-25 09:52:04 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-27 14:04:17 +0000 |
commit | fa7ee2447e6227e7f441d32e570489130c0932bb (patch) | |
tree | 16bba14539e43cf1b729a2d5a575f34c9c1d1dfc /src/gpu/effects/GrDistanceFieldGeoProc.cpp | |
parent | a78f1bc1d4055b82c8d31861f80cafdcc17f3d1f (diff) |
changed vertex attribute precisions to be actual types
Bug: skia:
Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70
Reviewed-on: https://skia-review.googlesource.com/50221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/effects/GrDistanceFieldGeoProc.cpp')
-rw-r--r-- | src/gpu/effects/GrDistanceFieldGeoProc.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp index 44e52735bd..dcbb5d5df9 100644 --- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp +++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp @@ -247,11 +247,9 @@ GrDistanceFieldA8TextGeoProc::GrDistanceFieldA8TextGeoProc( , fUsesLocalCoords(usesLocalCoords) { SkASSERT(!(flags & ~kNonLCD_DistanceFieldEffectMask)); this->initClassID<GrDistanceFieldA8TextGeoProc>(); - fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType, - kHigh_GrSLPrecision); - fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType); - fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_uint_GrVertexAttribType, - kHigh_GrSLPrecision); + fInPosition = &this->addVertexAttrib("inPosition", kFloat2_GrVertexAttribType); + fInColor = &this->addVertexAttrib("inColor", kUByte4_norm_GrVertexAttribType); + fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kUShort2_GrVertexAttribType); for (int i = 0; i < kMaxTextures; ++i) { if (proxies[i]) { fTextureSamplers[i].reset(std::move(proxies[i]), params); @@ -507,11 +505,9 @@ GrDistanceFieldPathGeoProc::GrDistanceFieldPathGeoProc( , fUsesLocalCoords(usesLocalCoords) { SkASSERT(!(flags & ~kNonLCD_DistanceFieldEffectMask)); this->initClassID<GrDistanceFieldPathGeoProc>(); - fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType, - kHigh_GrSLPrecision); - fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType); - fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_uint_GrVertexAttribType, - kHigh_GrSLPrecision); + fInPosition = &this->addVertexAttrib("inPosition", kFloat2_GrVertexAttribType); + fInColor = &this->addVertexAttrib("inColor", kUByte4_norm_GrVertexAttribType); + fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kUShort2_GrVertexAttribType); for (int i = 0; i < kMaxTextures; ++i) { if (proxies[i]) { fTextureSamplers[i].reset(std::move(proxies[i]), params); @@ -828,11 +824,9 @@ GrDistanceFieldLCDTextGeoProc::GrDistanceFieldLCDTextGeoProc( , fUsesLocalCoords(usesLocalCoords) { SkASSERT(!(flags & ~kLCD_DistanceFieldEffectMask) && (flags & kUseLCD_DistanceFieldEffectFlag)); this->initClassID<GrDistanceFieldLCDTextGeoProc>(); - fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType, - kHigh_GrSLPrecision); - fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType); - fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_uint_GrVertexAttribType, - kHigh_GrSLPrecision); + fInPosition = &this->addVertexAttrib("inPosition", kFloat2_GrVertexAttribType); + fInColor = &this->addVertexAttrib("inColor", kUByte4_norm_GrVertexAttribType); + fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kUShort2_GrVertexAttribType); for (int i = 0; i < kMaxTextures; ++i) { if (proxies[i]) { fTextureSamplers[i].reset(std::move(proxies[i]), params); |