From bca46e29e9f96999df0b38fb9359e71b73217c94 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Mon, 15 May 2017 11:03:26 -0600 Subject: 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 Reviewed-by: Brian Salomon --- tests/OnFlushCallbackTest.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tests/OnFlushCallbackTest.cpp') 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); } -- cgit v1.2.3