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 /tests | |
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 'tests')
-rw-r--r-- | tests/GrMeshTest.cpp | 10 | ||||
-rw-r--r-- | tests/GrPipelineDynamicStateTest.cpp | 4 | ||||
-rw-r--r-- | tests/PrimitiveProcessorTest.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp index 223138b4ce..1ae3926699 100644 --- a/tests/GrMeshTest.cpp +++ b/tests/GrMeshTest.cpp @@ -285,14 +285,14 @@ public: , fVertex(nullptr) , fColor(nullptr) { if (instanced) { - fInstanceLocation = &this->addInstanceAttrib("location", kVec2f_GrVertexAttribType); + fInstanceLocation = &this->addInstanceAttrib("location", kHalf2_GrVertexAttribType); if (hasVertexBuffer) { - fVertex = &this->addVertexAttrib("vertex", kVec2f_GrVertexAttribType); + fVertex = &this->addVertexAttrib("vertex", kHalf2_GrVertexAttribType); } - fColor = &this->addInstanceAttrib("color", kVec4ub_GrVertexAttribType); + fColor = &this->addInstanceAttrib("color", kUByte4_norm_GrVertexAttribType); } else { - fVertex = &this->addVertexAttrib("vertex", kVec2f_GrVertexAttribType); - fColor = &this->addVertexAttrib("color", kVec4ub_GrVertexAttribType); + fVertex = &this->addVertexAttrib("vertex", kHalf2_GrVertexAttribType); + fColor = &this->addVertexAttrib("color", kUByte4_norm_GrVertexAttribType); } this->initClassID<GrMeshTestProcessor>(); } diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp index 475f8f37e5..4b8621db04 100644 --- a/tests/GrPipelineDynamicStateTest.cpp +++ b/tests/GrPipelineDynamicStateTest.cpp @@ -59,8 +59,8 @@ struct Vertex { class GrPipelineDynamicStateTestProcessor : public GrGeometryProcessor { public: GrPipelineDynamicStateTestProcessor() - : fVertex(this->addVertexAttrib("vertex", kVec2f_GrVertexAttribType)) - , fColor(this->addVertexAttrib("color", kVec4ub_GrVertexAttribType)) { + : fVertex(this->addVertexAttrib("vertex", kHalf2_GrVertexAttribType)) + , fColor(this->addVertexAttrib("color", kUByte4_norm_GrVertexAttribType)) { this->initClassID<GrPipelineDynamicStateTestProcessor>(); } diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp index 6402020458..8898e35266 100644 --- a/tests/PrimitiveProcessorTest.cpp +++ b/tests/PrimitiveProcessorTest.cpp @@ -60,7 +60,7 @@ private: fAttribNames.push_back().printf("attr%d", i); } for (auto i = 0; i < numAttribs; ++i) { - this->addVertexAttrib(fAttribNames[i].c_str(), kVec2f_GrVertexAttribType); + this->addVertexAttrib(fAttribNames[i].c_str(), kFloat2_GrVertexAttribType); } } const char* name() const override { return "Dummy GP"; } |