aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-16 17:48:11 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-16 17:48:11 +0000
commite9cd27d4a3c92393cc6c79d4d6f93d266411d95e (patch)
tree5f7abfe6a8784b514a386a3d308242bd9224c257 /src/gpu
parent1ae6c2b0121fd1fcd5b736a810060fc66ed68286 (diff)
Third wave of Win64 warning cleanup
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gl/GrGLBufferImpl.cpp8
-rw-r--r--src/gpu/gl/GrGLShaderBuilder.cpp2
-rw-r--r--src/gpu/gl/GrGpuGL.cpp7
3 files changed, 9 insertions, 8 deletions
diff --git a/src/gpu/gl/GrGLBufferImpl.cpp b/src/gpu/gl/GrGLBufferImpl.cpp
index 1d77070ebf..3c75b9fe6a 100644
--- a/src/gpu/gl/GrGLBufferImpl.cpp
+++ b/src/gpu/gl/GrGLBufferImpl.cpp
@@ -78,7 +78,7 @@ void* GrGLBufferImpl::lock(GrGpuGL* gpu) {
this->bind(gpu);
// Let driver know it can discard the old data
GL_CALL(gpu, BufferData(fBufferType,
- fDesc.fSizeInBytes,
+ (GrGLsizeiptr) fDesc.fSizeInBytes,
NULL,
fDesc.fDynamic ? DYNAMIC_USAGE_PARAM : GR_GL_STATIC_DRAW));
GR_GL_CALL_RET(gpu->glInterface(),
@@ -119,7 +119,7 @@ bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInB
#if GR_GL_USE_BUFFER_DATA_NULL_HINT
if (fDesc.fSizeInBytes == srcSizeInBytes) {
- GL_CALL(gpu, BufferData(fBufferType, srcSizeInBytes, src, usage));
+ GL_CALL(gpu, BufferData(fBufferType, (GrGLsizeiptr) srcSizeInBytes, src, usage));
} else {
// Before we call glBufferSubData we give the driver a hint using
// glBufferData with NULL. This makes the old buffer contents
@@ -127,8 +127,8 @@ bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInB
// draws that reference the old contents. With this hint it can
// assign a different allocation for the new contents to avoid
// flushing the gpu past draws consuming the old contents.
- GL_CALL(gpu, BufferData(fBufferType, fDesc.fSizeInBytes, NULL, usage));
- GL_CALL(gpu, BufferSubData(fBufferType, 0, srcSizeInBytes, src));
+ GL_CALL(gpu, BufferData(fBufferType, (GrGLsizeiptr) fDesc.fSizeInBytes, NULL, usage));
+ GL_CALL(gpu, BufferSubData(fBufferType, 0, (GrGLsizeiptr) srcSizeInBytes, src));
}
#else
// Note that we're cheating on the size here. Currently no methods
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index 8b7d614a0b..71942404e7 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -630,7 +630,7 @@ bool attach_shader(const GrGLInterface* gli,
}
const GrGLchar* sourceStr = shaderSrc.c_str();
- int sourceLength = shaderSrc.size();
+ GrGLint sourceLength = static_cast<GrGLint>(shaderSrc.size());
GR_GL_CALL(gli, ShaderSource(shaderId, 1, &sourceStr, &sourceLength));
GrGLint compiled = GR_GL_INIT_ZERO;
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index f0815a687d..0642fc4a9c 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1167,7 +1167,7 @@ GrVertexBuffer* GrGpuGL::onCreateVertexBuffer(size_t size, bool dynamic) {
// make sure driver can allocate memory for this buffer
GL_ALLOC_CALL(this->glInterface(),
BufferData(GR_GL_ARRAY_BUFFER,
- desc.fSizeInBytes,
+ (GrGLsizeiptr) desc.fSizeInBytes,
NULL, // data ptr
desc.fDynamic ? GR_GL_DYNAMIC_DRAW : GR_GL_STATIC_DRAW));
if (CHECK_ALLOC_ERROR(this->glInterface()) != GR_GL_NO_ERROR) {
@@ -1200,7 +1200,7 @@ GrIndexBuffer* GrGpuGL::onCreateIndexBuffer(size_t size, bool dynamic) {
// make sure driver can allocate memory for this buffer
GL_ALLOC_CALL(this->glInterface(),
BufferData(GR_GL_ELEMENT_ARRAY_BUFFER,
- desc.fSizeInBytes,
+ (GrGLsizeiptr) desc.fSizeInBytes,
NULL, // data ptr
desc.fDynamic ? GR_GL_DYNAMIC_DRAW : GR_GL_STATIC_DRAW));
if (CHECK_ALLOC_ERROR(this->glInterface()) != GR_GL_NO_ERROR) {
@@ -1448,7 +1448,8 @@ bool GrGpuGL::onReadPixels(GrRenderTarget* target,
if (rowBytes != tightRowBytes) {
if (this->glCaps().packRowLengthSupport()) {
SkASSERT(!(rowBytes % sizeof(GrColor)));
- GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, rowBytes / sizeof(GrColor)));
+ GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH,
+ static_cast<GrGLint>(rowBytes / sizeof(GrColor))));
readDstRowBytes = rowBytes;
} else {
scratch.reset(tightRowBytes * height);