aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
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
parent1ae6c2b0121fd1fcd5b736a810060fc66ed68286 (diff)
Third wave of Win64 warning cleanup
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLBufferImpl.cpp8
-rw-r--r--src/gpu/gl/GrGLShaderBuilder.cpp2
-rw-r--r--src/gpu/gl/GrGpuGL.cpp7
-rw-r--r--src/pdf/SkTSet.h2
-rw-r--r--src/utils/SkPDFRasterizer.cpp6
5 files changed, 13 insertions, 12 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);
diff --git a/src/pdf/SkTSet.h b/src/pdf/SkTSet.h
index 1609a9de10..f57d30eccb 100644
--- a/src/pdf/SkTSet.h
+++ b/src/pdf/SkTSet.h
@@ -199,7 +199,7 @@ public:
/** Reserves memory for the set.
*/
- void setReserve(size_t reserve) {
+ void setReserve(int reserve) {
SkASSERT(fSetArray);
SkASSERT(fOrderedArray);
fSetArray->setReserve(reserve);
diff --git a/src/utils/SkPDFRasterizer.cpp b/src/utils/SkPDFRasterizer.cpp
index bf0ab25a40..a3b4cb4a53 100644
--- a/src/utils/SkPDFRasterizer.cpp
+++ b/src/utils/SkPDFRasterizer.cpp
@@ -38,7 +38,7 @@ bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) {
return false;
}
- size_t width = image.width(), height = image.height();
+ int width = image.width(), height = image.height();
size_t rowSize = image.bytes_per_row();
char *imgData = image.data();
@@ -51,9 +51,9 @@ bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) {
SkPMColor* bitmapPixels = (SkPMColor*)bitmap.getPixels();
// do pixel-by-pixel copy to deal with RGBA ordering conversions
- for (size_t y = 0; y < height; y++) {
+ for (int y = 0; y < height; y++) {
char *rowData = imgData;
- for (size_t x = 0; x < width; x++) {
+ for (int x = 0; x < width; x++) {
uint8_t a = rowData[3];
uint8_t r = rowData[2];
uint8_t g = rowData[1];