diff options
author | 2015-05-07 11:35:55 -0700 | |
---|---|---|
committer | 2015-05-07 11:35:55 -0700 | |
commit | e64eb570a5b9480bc24d0656ccabcff1ab13a229 (patch) | |
tree | 63b3e4e6bb0533a35f33b00a65e77c37d638c00a /src/gpu/GrGpu.cpp | |
parent | 3b58d75170508567436cce259384d336949407d4 (diff) |
Iterate over instanced draws in GrGpu rather than above GrBatchTarget
Review URL: https://codereview.chromium.org/1127273007
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r-- | src/gpu/GrGpu.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index 8222504b0e..15e4b28c3a 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -29,6 +29,7 @@ GrVertices& GrVertices::operator =(const GrVertices& di) { fInstanceCount = di.fInstanceCount; fVerticesPerInstance = di.fVerticesPerInstance; fIndicesPerInstance = di.fIndicesPerInstance; + fMaxInstancesPerDraw = di.fMaxInstancesPerDraw; fVertexBuffer.reset(di.vertexBuffer()); fIndexBuffer.reset(di.indexBuffer()); @@ -288,7 +289,11 @@ void GrGpu::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { this->handleDirtyContext(); - this->onDraw(args, vertices); + GrVertices::Iterator iter; + const GrNonInstancedVertices* verts = iter.init(vertices); + do { + this->onDraw(args, *verts); + } while ((verts = iter.next())); } void GrGpu::stencilPath(const GrPath* path, const StencilPathState& state) { |