aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrVertexBufferAllocPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/src/GrVertexBufferAllocPool.cpp')
-rw-r--r--gpu/src/GrVertexBufferAllocPool.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gpu/src/GrVertexBufferAllocPool.cpp b/gpu/src/GrVertexBufferAllocPool.cpp
index b6f08c97ee..360a086a09 100644
--- a/gpu/src/GrVertexBufferAllocPool.cpp
+++ b/gpu/src/GrVertexBufferAllocPool.cpp
@@ -93,7 +93,8 @@ void* GrVertexBufferAllocPool::alloc(GrVertexLayout layout,
GrAssert(fBlocks.back().fVertexBuffer->isLocked());
BufferBlock& back = fBlocks.back();
uint32_t usedBytes = back.fVertexBuffer->size() - back.fBytesFree;
- uint32_t pad = GrUIAlignUpPad(usedBytes, layout);
+ uint32_t pad = GrUIAlignUpPad(usedBytes,
+ GrDrawTarget::VertexSize(layout));
if ((bytes + pad) <= back.fBytesFree) {
usedBytes += pad;
*startVertex = usedBytes / vSize;