Should be calculating alignment based on the vertex size.



git-svn-id: http://skia.googlecode.com/svn/trunk@690 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrVertexBufferAllocPool.cpp b/gpu/src/GrVertexBufferAllocPool.cpp
index b6f08c9..360a086 100644
--- a/gpu/src/GrVertexBufferAllocPool.cpp
+++ b/gpu/src/GrVertexBufferAllocPool.cpp
@@ -93,7 +93,8 @@
         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;