diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-14 21:53:24 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-14 21:53:24 +0000 |
commit | adacc7067ad617cdc7bbef39192ca80f4b4d27f9 (patch) | |
tree | 3f6a13154d08c42648ccea82257f37f7c321b00e /src/gpu/GrBufferAllocPool.cpp | |
parent | 04b57f87ab6789f7fc302eda8a993d88d4feea8f (diff) |
Start cleaning up 64bit Win warnings
https://codereview.chromium.org/27192003/
git-svn-id: http://skia.googlecode.com/svn/trunk@11764 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrBufferAllocPool.cpp')
-rw-r--r-- | src/gpu/GrBufferAllocPool.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index 887f8cdfe1..b34fe8a8e3 100644 --- a/src/gpu/GrBufferAllocPool.cpp +++ b/src/gpu/GrBufferAllocPool.cpp @@ -203,9 +203,9 @@ int GrBufferAllocPool::currentBufferItems(size_t itemSize) const { const BufferBlock& back = fBlocks.back(); size_t usedBytes = back.fBuffer->sizeInBytes() - back.fBytesFree; size_t pad = GrSizeAlignUpPad(usedBytes, itemSize); - return (back.fBytesFree - pad) / itemSize; + return static_cast<int>((back.fBytesFree - pad) / itemSize); } else if (fPreallocBuffersInUse < fPreallocBuffers.count()) { - return fMinBlockSize / itemSize; + return static_cast<int>(fMinBlockSize / itemSize); } return 0; } @@ -404,7 +404,7 @@ void* GrVertexBufferAllocPool::makeSpace(size_t vertexSize, *buffer = (const GrVertexBuffer*) geomBuffer; SkASSERT(0 == offset % vertexSize); - *startVertex = offset / vertexSize; + *startVertex = static_cast<int>(offset / vertexSize); return ptr; } @@ -425,7 +425,7 @@ bool GrVertexBufferAllocPool::appendVertices(size_t vertexSize, } int GrVertexBufferAllocPool::preallocatedBufferVertices(size_t vertexSize) const { - return INHERITED::preallocatedBufferSize() / vertexSize; + return static_cast<int>(INHERITED::preallocatedBufferSize() / vertexSize); } int GrVertexBufferAllocPool::currentBufferVertices(size_t vertexSize) const { @@ -462,7 +462,7 @@ void* GrIndexBufferAllocPool::makeSpace(int indexCount, *buffer = (const GrIndexBuffer*) geomBuffer; SkASSERT(0 == offset % sizeof(uint16_t)); - *startIndex = offset / sizeof(uint16_t); + *startIndex = static_cast<int>(offset / sizeof(uint16_t)); return ptr; } @@ -480,7 +480,7 @@ bool GrIndexBufferAllocPool::appendIndices(int indexCount, } int GrIndexBufferAllocPool::preallocatedBufferIndices() const { - return INHERITED::preallocatedBufferSize() / sizeof(uint16_t); + return static_cast<int>(INHERITED::preallocatedBufferSize() / sizeof(uint16_t)); } int GrIndexBufferAllocPool::currentBufferIndices() const { |