aboutsummaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorBrian Salomon <bsalomon@google.com>2018-08-05 21:30:33 -0400
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-08-06 14:38:22 +0000
commitb948572c7862214fe2e1fa6cdfcab4fc7b1666ac (patch)
treecd70ed23156e92663c66d232acd1485208e3c99b /bench
parentc0b03d8dfc5b05a1ae665c2d07cf125b18694b93 (diff)
downloadskqp-b948572c7862214fe2e1fa6cdfcab4fc7b1666ac.tar.gz
Store GrMeshDrawOps' meshes in GrOpFlushState's arena.
Remove late draw consolidation in GrOpFlushState. Rarely did anything and doesn't work with new allocation strategy. Ops can use GrMesh arrays to acheive the same thing. (Each Op that cared to would have to implement but it isn't applicable to most Ops). Modify GrMeshDrawOp::Target::draw() to take array of meshes, with single mesh as a special case. Change-Id: I552677de47b9ffd2fcaf55af85f70f290e5aa9c7 Reviewed-on: https://skia-review.googlesource.com/145426 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'bench')
-rw-r--r--bench/VertexColorSpaceBench.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/bench/VertexColorSpaceBench.cpp b/bench/VertexColorSpaceBench.cpp
index 717a529f9a..11d58869fd 100644
--- a/bench/VertexColorSpaceBench.cpp
+++ b/bench/VertexColorSpaceBench.cpp
@@ -199,9 +199,9 @@ private:
}
}
- GrMesh mesh(GrPrimitiveType::kTriangleStrip);
- mesh.setNonIndexedNonInstanced(kVertexCount);
- mesh.setVertexData(vertexBuffer, firstVertex);
+ GrMesh* mesh = target->allocMesh(GrPrimitiveType::kTriangleStrip);
+ mesh->setNonIndexedNonInstanced(kVertexCount);
+ mesh->setVertexData(vertexBuffer, firstVertex);
auto pipe = target->makePipeline(0, GrProcessorSet::MakeEmptySet(),
target->detachAppliedClip());
target->draw(gp, pipe.fPipeline, pipe.fFixedDynamicState, mesh);