aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-06-08 18:05:20 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-08 22:32:02 +0000
commit802cb318f695d5c3ade20b6424c97ea548a929b2 (patch)
tree964cb86d42d1d3e0e2ffb970364622b902733a44 /tests
parent65b7bfcf61c5d925bf0066a2b40dd6ef7cf82595 (diff)
Stop passing GrPrimitiveProcessor to GrMesh::sendToGpu.
It is currently used in GrGLGpu::setupGeometry. Instead: 1) Make GrMesh track whether primitive restart should be enabled. 2) Make GrGLProgram track program attributes. Change-Id: Ice411a495961fcbc3cedc81e8ae0583537f42153 Reviewed-on: https://skia-review.googlesource.com/132267 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GrMeshTest.cpp7
-rw-r--r--tests/OnFlushCallbackTest.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp
index fb3579cabe..e612fb4b5f 100644
--- a/tests/GrMeshTest.cpp
+++ b/tests/GrMeshTest.cpp
@@ -172,7 +172,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrMeshTest, reporter, ctxInfo) {
GrMesh mesh(GrPrimitiveType::kTriangles);
mesh.setIndexed(ibuff.get(), repetitionCount * 6, baseRepetition * 6,
- baseRepetition * 4, (baseRepetition + repetitionCount) * 4 - 1);
+ baseRepetition * 4, (baseRepetition + repetitionCount) * 4 - 1,
+ GrPrimitiveRestart::kNo);
mesh.setVertexData(vbuff.get(), (i - baseRepetition) * 4);
helper->drawMesh(mesh);
@@ -220,8 +221,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrMeshTest, reporter, ctxInfo) {
: GrPrimitiveType::kTriangleStrip);
if (indexed) {
VALIDATE(idxbuff);
- mesh.setIndexedInstanced(idxbuff.get(), 6,
- instbuff.get(), kBoxCountX, y * kBoxCountX);
+ mesh.setIndexedInstanced(idxbuff.get(), 6, instbuff.get(), kBoxCountX,
+ y * kBoxCountX, GrPrimitiveRestart::kNo);
} else {
mesh.setInstanced(instbuff.get(), kBoxCountX, y * kBoxCountX, 4);
}
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index 463e44f194..e9e4dd0462 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -156,7 +156,7 @@ private:
}
GrMesh mesh(GrPrimitiveType::kTriangles);
- mesh.setIndexed(indexBuffer, 6, firstIndex, 0, 3);
+ mesh.setIndexed(indexBuffer, 6, firstIndex, 0, 3, GrPrimitiveRestart::kNo);
mesh.setVertexData(vertexBuffer, firstVertex);
target->draw(gp.get(), fHelper.makePipeline(target), mesh);