diff options
author | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-31 21:34:25 +0000 |
---|---|---|
committer | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-31 21:34:25 +0000 |
commit | a63389843dd18003382d61c2e4610af09ed07d38 (patch) | |
tree | e43d25c69c3afa3955679a20c1199ad2f7e2c614 /src/gpu/GrBufferAllocPool.h | |
parent | 29dea74ca6ad6044dc9a90f8ca55092b34945ce4 (diff) |
Change vertex buffer allocator functions to take size rather than layout, take two.
Resubmission of r7498.
https://codereview.appspot.com/7228078
git-svn-id: http://skia.googlecode.com/svn/trunk@7501 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrBufferAllocPool.h')
-rw-r--r-- | src/gpu/GrBufferAllocPool.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/GrBufferAllocPool.h b/src/gpu/GrBufferAllocPool.h index 654ba744f9..ffd8c34092 100644 --- a/src/gpu/GrBufferAllocPool.h +++ b/src/gpu/GrBufferAllocPool.h @@ -222,7 +222,7 @@ public: * the buffer at the offset indicated by startVertex. Until that time they * may be in temporary storage and/or the buffer may be locked. * - * @param layout specifies type of vertices to allocate space for + * @param vertexSize specifies size of a vertex to allocate space for * @param vertexCount number of vertices to allocate space for * @param buffer returns the vertex buffer that will hold the * vertices. @@ -230,7 +230,7 @@ public: * In units of the size of a vertex from layout param. * @return pointer to first vertex. */ - void* makeSpace(GrVertexLayout layout, + void* makeSpace(size_t vertexSize, int vertexCount, const GrVertexBuffer** buffer, int* startVertex); @@ -238,7 +238,7 @@ public: /** * Shortcut to make space and then write verts into the made space. */ - bool appendVertices(GrVertexLayout layout, + bool appendVertices(size_t vertexSize, int vertexCount, const void* vertices, const GrVertexBuffer** buffer, @@ -251,21 +251,21 @@ public: * would fit in the next available preallocated buffer. If any makeSpace * would force a new VB to be created the return value will be zero. * - * @param the format of vertices to compute space for. + * @param the size of a vertex to compute space for. * @return the number of vertices that would fit in the current buffer. */ - int currentBufferVertices(GrVertexLayout layout) const; + int currentBufferVertices(size_t vertexSize) const; /** * Gets the number of vertices that can fit in a preallocated vertex buffer. * Zero if no preallocated buffers. * - * @param the format of vertices to compute space for. + * @param the size of a vertex to compute space for. * * @return number of vertices that fit in one of the preallocated vertex * buffers. */ - int preallocatedBufferVertices(GrVertexLayout layout) const; + int preallocatedBufferVertices(size_t vertexSize) const; private: typedef GrBufferAllocPool INHERITED; |