aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/OnFlushCallbackTest.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-05-15 11:03:26 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-15 18:01:59 +0000
commitbca46e29e9f96999df0b38fb9359e71b73217c94 (patch)
tree0bd487809346776fccfee12540968cb23aa6cb7a /tests/OnFlushCallbackTest.cpp
parent18e9484ad5b5755757dc6badb986017a088a9c6b (diff)
Convert GrMesh back to a class
Specific methods that limit the data to valid configurations are better than a runtime mega-assert. Bug: skia: Change-Id: Ie15f2dc79659e44cfaddd16eb474795b110fda73 Reviewed-on: https://skia-review.googlesource.com/16577 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/OnFlushCallbackTest.cpp')
-rw-r--r--tests/OnFlushCallbackTest.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index 4adcad93c6..7aae86696b 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -144,14 +144,9 @@ private:
}
}
- GrMesh mesh;
- mesh.fPrimitiveType = kTriangles_GrPrimitiveType;
- mesh.fIndexBuffer.reset(indexBuffer);
- mesh.fIndexCount = 6;
- mesh.fBaseIndex = firstIndex;
- mesh.fVertexBuffer.reset(vertexBuffer);
- mesh.fVertexCount = 4;
- mesh.fBaseVertex = firstVertex;
+ GrMesh mesh(kTriangles_GrPrimitiveType);
+ mesh.setIndexed(indexBuffer, 6, firstIndex);
+ mesh.setVertices(vertexBuffer, 4, firstVertex);
target->draw(gp.get(), this->pipeline(), mesh);
}