Third wave of Win64 warning cleanup

https://codereview.chromium.org/27487003/



git-svn-id: http://skia.googlecode.com/svn/trunk/src@11817 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/gl/GrGLBufferImpl.cpp b/gpu/gl/GrGLBufferImpl.cpp
index 1d77070..3c75b9f 100644
--- a/gpu/gl/GrGLBufferImpl.cpp
+++ b/gpu/gl/GrGLBufferImpl.cpp
@@ -78,7 +78,7 @@
         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 @@
 
 #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 @@
         // 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/gpu/gl/GrGLShaderBuilder.cpp b/gpu/gl/GrGLShaderBuilder.cpp
index 8b7d614..7194240 100644
--- a/gpu/gl/GrGLShaderBuilder.cpp
+++ b/gpu/gl/GrGLShaderBuilder.cpp
@@ -630,7 +630,7 @@
     }
 
     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/gpu/gl/GrGpuGL.cpp b/gpu/gl/GrGpuGL.cpp
index f0815a6..0642fc4 100644
--- a/gpu/gl/GrGpuGL.cpp
+++ b/gpu/gl/GrGpuGL.cpp
@@ -1167,7 +1167,7 @@
             // 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 @@
             // 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 @@
     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/pdf/SkTSet.h b/pdf/SkTSet.h
index 1609a9d..f57d30e 100644
--- a/pdf/SkTSet.h
+++ b/pdf/SkTSet.h
@@ -199,7 +199,7 @@
 
     /** Reserves memory for the set.
      */
-    void setReserve(size_t reserve) {
+    void setReserve(int reserve) {
         SkASSERT(fSetArray);
         SkASSERT(fOrderedArray);
         fSetArray->setReserve(reserve);
diff --git a/utils/SkPDFRasterizer.cpp b/utils/SkPDFRasterizer.cpp
index bf0ab25..a3b4cb4 100644
--- a/utils/SkPDFRasterizer.cpp
+++ b/utils/SkPDFRasterizer.cpp
@@ -38,7 +38,7 @@
     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 @@
   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];