aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-11 19:45:22 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-11 19:45:22 +0000
commit548a433ec356cc38f73780563501a00ed937c49c (patch)
tree8a7735c9522e1e27a33adcc45fd5d0893509c004 /src
parent641ca9c8085584db1d640d6b279a335a2a002cb1 (diff)
Fix linux warnings
Review URL: http://codereview.appspot.com/6354093/ git-svn-id: http://skia.googlecode.com/svn/trunk@4554 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp6
-rw-r--r--src/gpu/gl/GrGLPath.cpp4
-rw-r--r--src/gpu/gl/GrGpuGL.cpp1
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 3c6726cbd2..0afbe57319 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -175,8 +175,8 @@ bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf,
return true;
}
- int otherFormat = GR_GL_RGBA;
- int otherType = GR_GL_UNSIGNED_BYTE;
+ GrGLint otherFormat = GR_GL_RGBA;
+ GrGLint otherType = GR_GL_UNSIGNED_BYTE;
// The other supported format/type combo supported for ReadPixels
// can change based on which render target is bound
@@ -188,7 +188,7 @@ bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf,
GR_GL_IMPLEMENTATION_COLOR_READ_TYPE,
&otherType);
- return otherFormat == format && otherType == type;
+ return (GrGLenum)otherFormat == format && (GrGLenum)otherType == type;
}
namespace {
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp
index 217cf4dd0d..64d5a55945 100644
--- a/src/gpu/gl/GrGLPath.cpp
+++ b/src/gpu/gl/GrGLPath.cpp
@@ -29,7 +29,7 @@ inline GrGLubyte verb_to_gl_path_cmd(const SkPath::Verb verb) {
GR_STATIC_ASSERT(3 == SkPath::kCubic_Verb);
GR_STATIC_ASSERT(4 == SkPath::kClose_Verb);
- GrAssert(verb >= 0 && verb < GR_ARRAY_COUNT(gTable));
+ GrAssert(verb >= 0 && (size_t)verb < GR_ARRAY_COUNT(gTable));
return gTable[verb];
}
@@ -47,7 +47,7 @@ inline int num_pts(const SkPath::Verb verb) {
GR_STATIC_ASSERT(3 == SkPath::kCubic_Verb);
GR_STATIC_ASSERT(4 == SkPath::kClose_Verb);
- GrAssert(verb >= 0 && verb < GR_ARRAY_COUNT(gTable));
+ GrAssert(verb >= 0 && (size_t)verb < GR_ARRAY_COUNT(gTable));
return gTable[verb];
}
}
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 7c1306ed6d..7ebe9d7f06 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1810,6 +1810,7 @@ void GrGpuGL::onGpuStencilPath(const GrPath* path, GrPathFill fill) {
default:
// Only the above two fill rules are allowed.
GrCrash("Unexpected path fill.");
+ return; // suppress unused var warning.
}
GrGLint writeMask = fStencilSettings.writeMask(GrStencilSettings::kFront_Face);
GL_CALL(StencilFillPath(id, fillMode, writeMask));