Revert of Move instanced index buffer creation to flush time (patchset #6 id:100001 of https://codereview.chromium.org/1116943004/)
Reason for revert:
messed up caching, recreating index buffers all the time.
Original issue's description:
> Move instanced index buffer creation to flush time
>
> Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26
TBR=joshualitt@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1126613003
diff --git a/src/gpu/GrBatchTarget.h b/src/gpu/GrBatchTarget.h
index 97cd2ed..9bd6b94 100644
--- a/src/gpu/GrBatchTarget.h
+++ b/src/gpu/GrBatchTarget.h
@@ -121,7 +121,9 @@
GrVertexBufferAllocPool* vertexPool() { return fVertexPool; }
GrIndexBufferAllocPool* indexPool() { return fIndexPool; }
- GrResourceProvider* resourceProvider() const { return fGpu->getContext()->resourceProvider(); }
+ const static int kVertsPerRect = 4;
+ const static int kIndicesPerRect = 6;
+ const GrIndexBuffer* quadIndexBuffer() const { return fGpu->getQuadIndexBuffer(); }
// A helper for draws which overallocate and then return data to the pool
void putBackIndices(size_t indices) { fIndexPool->putBack(indices * sizeof(uint16_t)); }