aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBufferAllocPool.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-14 21:53:24 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-14 21:53:24 +0000
commitadacc7067ad617cdc7bbef39192ca80f4b4d27f9 (patch)
tree3f6a13154d08c42648ccea82257f37f7c321b00e /src/gpu/GrBufferAllocPool.cpp
parent04b57f87ab6789f7fc302eda8a993d88d4feea8f (diff)
Start cleaning up 64bit Win warnings
Diffstat (limited to 'src/gpu/GrBufferAllocPool.cpp')
-rw-r--r--src/gpu/GrBufferAllocPool.cpp12
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 {