diff options
author | 2013-01-31 20:15:36 +0000 | |
---|---|---|
committer | 2013-01-31 20:15:36 +0000 | |
commit | 84cd77c4eb3145335a76966e582d0d9c71ecc264 (patch) | |
tree | a57452fbd13692ac252581c707ee008703a87c97 /src/gpu/GrBufferAllocPool.h | |
parent | cfcb1bef94a8cfb565d9450b38f57d4f5c83790a (diff) |
Change vertex buffer allocator functions to take size rather than layout.
https://codereview.appspot.com/7228078
git-svn-id: http://skia.googlecode.com/svn/trunk@7498 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; |