aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/DashBench.cpp8
-rw-r--r--gyp/common_conditions.gypi6
-rw-r--r--src/gpu/gl/GrGLSL.h2
-rw-r--r--src/gpu/gl/GrGpuGL.cpp2
-rw-r--r--src/views/mac/SkTextFieldCell.m4
5 files changed, 13 insertions, 9 deletions
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index 3853a20488..5d320a2822 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -323,12 +323,13 @@ public:
enum LineType {
kHori_LineType,
kVert_LineType,
- kDiag_LineType
+ kDiag_LineType,
+ kLineTypeCount
};
static const char* LineTypeName(LineType lt) {
static const char* gNames[] = { "hori", "vert", "diag" };
- SkASSERT((size_t)lt <= SK_ARRAY_COUNT(gNames));
+ SK_COMPILE_ASSERT(kLineTypeCount == SK_ARRAY_COUNT(gNames), names_wrong_size);
return gNames[lt];
}
@@ -356,6 +357,9 @@ public:
case kDiag_LineType:
matrix.setRotate(45, cx, cy);
break;
+ case kLineTypeCount:
+ // Not a real enum value.
+ break;
}
const SkScalar overshoot = 100*1000;
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index feb364fd2c..81c958a9e3 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -178,12 +178,12 @@
'conditions' : [
[ 'skia_arch_width == 64', {
'xcode_settings': {
- 'ARCHS': 'x86_64',
+ 'ARCHS': ['x86_64'],
},
}],
[ 'skia_arch_width == 32', {
'xcode_settings': {
- 'ARCHS': 'i386',
+ 'ARCHS': ['i386'],
},
}],
[ 'skia_warnings_as_errors', {
@@ -274,7 +274,7 @@
},
},
'xcode_settings': {
- 'ARCHS': 'armv6 armv7',
+ 'ARCHS': ['armv6', 'armv7'],
'CODE_SIGNING_REQUIRED': 'NO',
'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
diff --git a/src/gpu/gl/GrGLSL.h b/src/gpu/gl/GrGLSL.h
index 869b0e180c..883cc9b41a 100644
--- a/src/gpu/gl/GrGLSL.h
+++ b/src/gpu/gl/GrGLSL.h
@@ -54,7 +54,7 @@ static inline int GrSLTypeToVecLength(GrSLType type) {
1, // kMat44f_GrSLType
1, // kSampler2D_GrSLType
};
- GrAssert((size_t) type < GR_ARRAY_COUNT(kVecLengths));
+ GR_STATIC_ASSERT(kGrSLTypeCount == GR_ARRAY_COUNT(kVecLengths));
return kVecLengths[type];
}
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 3f5ab03303..0f3d534331 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1966,7 +1966,7 @@ inline GrGLenum tile_to_gl_wrap(SkShader::TileMode tm) {
GR_GL_REPEAT,
GR_GL_MIRRORED_REPEAT
};
- GrAssert((unsigned) tm <= SK_ARRAY_COUNT(gWrapModes));
+ GR_STATIC_ASSERT(SkShader::kTileModeCount == SK_ARRAY_COUNT(gWrapModes));
GR_STATIC_ASSERT(0 == SkShader::kClamp_TileMode);
GR_STATIC_ASSERT(1 == SkShader::kRepeat_TileMode);
GR_STATIC_ASSERT(2 == SkShader::kMirror_TileMode);
diff --git a/src/views/mac/SkTextFieldCell.m b/src/views/mac/SkTextFieldCell.m
index 7aa094da88..c5efc46406 100644
--- a/src/views/mac/SkTextFieldCell.m
+++ b/src/views/mac/SkTextFieldCell.m
@@ -25,8 +25,8 @@
inView:(NSView *)controlView
editor:(NSText *)textObj
delegate:(id)anObject
- start:(int)selStart
- length:(int)selLength {
+ start:(NSInteger)selStart
+ length:(NSInteger)selLength {
aRect = [self drawingRectForBounds:aRect];
selectingOrEditing = YES;
[super selectWithFrame:aRect