diff options
Diffstat (limited to 'src/gpu/ops/GrDrawVerticesOp.cpp')
-rw-r--r-- | src/gpu/ops/GrDrawVerticesOp.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp index c67233c9ed..aa90db9afd 100644 --- a/src/gpu/ops/GrDrawVerticesOp.cpp +++ b/src/gpu/ops/GrDrawVerticesOp.cpp @@ -236,13 +236,15 @@ void GrDrawVerticesOp::onPrepareDraws(Target* target) const { } GrMesh mesh; + mesh.fPrimitiveType = this->primitiveType(); if (indices) { - mesh.initIndexed(this->primitiveType(), vertexBuffer, indexBuffer, firstVertex, firstIndex, - fVertexCount, fIndexCount); - - } else { - mesh.init(this->primitiveType(), vertexBuffer, firstVertex, fVertexCount); + mesh.fIndexBuffer.reset(indexBuffer); + mesh.fIndexCount = fIndexCount; + mesh.fBaseIndex = firstIndex; } + mesh.fVertexBuffer.reset(vertexBuffer); + mesh.fVertexCount = fVertexCount; + mesh.fBaseVertex = firstVertex; target->draw(gp.get(), this->pipeline(), mesh); } |