aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-05 17:40:04 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-05 17:40:04 +0000
commit100abf49e10544bc4f436bf1f38e6929779621f4 (patch)
tree4ae7d19bebf5b7d79f646cfa25ed1560330004fe /src
parent1f45e934b68a5985b2127ec871ff593c3bfc7c2e (diff)
Shut up some Mac (xcode 3) warnings
Review URL: http://codereview.appspot.com/6503053/ git-svn-id: http://skia.googlecode.com/svn/trunk@5402 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/animator/SkScriptTokenizer.cpp4
-rw-r--r--src/core/SkBitmapProcState_shaderproc.h3
-rw-r--r--src/core/SkPixelRef.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.cpp4
-rw-r--r--src/gpu/GrClipMaskManager.cpp2
-rw-r--r--src/gpu/gl/GrGLProgram.cpp2
-rw-r--r--src/gpu/gl/GrGpuGL.cpp6
-rw-r--r--src/utils/SkDeferredCanvas.cpp2
8 files changed, 15 insertions, 10 deletions
diff --git a/src/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp
index 9547a988b2..a1de5e5792 100644
--- a/src/animator/SkScriptTokenizer.cpp
+++ b/src/animator/SkScriptTokenizer.cpp
@@ -1276,8 +1276,8 @@ bool SkScriptEngine2::ValueToString(const SkScriptValue2& value, SkString* strin
#define testInt(expression) { #expression, SkOperand2::kS32, expression, 0, NULL }
#ifdef SK_SCALAR_IS_FLOAT
-#define testScalar(expression) { #expression, SkOperand2::kScalar, 0, (float) expression, NULL }
-#define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkOperand2::kScalar, 0, fmodf(exp1, exp2), NULL }
+#define testScalar(expression) { #expression, SkOperand2::kScalar, 0, (float) (expression), NULL }
+#define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkOperand2::kScalar, 0, fmodf((float) exp1, (float) exp2), NULL }
#else
#define testScalar(expression) { #expression, SkOperand2::kScalar, 0, (int) ((expression) * 65536.0f), NULL }
#define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkOperand2::kScalar, 0, (int) (fmod(exp1, exp2) * 65536.0f), NULL }
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h
index 6f2bbe722d..cf15a50598 100644
--- a/src/core/SkBitmapProcState_shaderproc.h
+++ b/src/core/SkBitmapProcState_shaderproc.h
@@ -13,6 +13,9 @@
// Can't be static in the general case because some of these implementations
// will be defined and referenced in different object files.
void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y,
+ DSTTYPE* SK_RESTRICT colors, int count);
+
+void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y,
DSTTYPE* SK_RESTRICT colors, int count) {
SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask |
SkMatrix::kScale_Mask)) == 0);
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index f71458b7dd..69bbad7502 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -34,6 +34,8 @@ static SkBaseMutex* get_default_mutex() {
///////////////////////////////////////////////////////////////////////////////
+int32_t SkNextPixelRefGenerationID();
+
int32_t SkNextPixelRefGenerationID() {
static int32_t gPixelRefGenerationID;
// do a loop in case our global wraps around, as we never want to
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index c84989b67f..38733f3b1f 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -188,7 +188,7 @@ void SkTwoPointConicalGradient::shadeSpan(int x, int y, SkPMColor* dstCParam,
SkPMColor* SK_RESTRICT dstC = dstCParam;
SkMatrix::MapXYProc dstProc = fDstToIndexProc;
- TileProc proc = fTileProc;
+
const SkPMColor* SK_RESTRICT cache = this->getCache32();
TwoPointRadialProc shadeProc = twopoint_repeat;
@@ -254,8 +254,6 @@ bool SkTwoPointConicalGradient::setContext(const SkBitmap& device,
SkShader::BitmapType SkTwoPointConicalGradient::asABitmap(
SkBitmap* bitmap, SkMatrix* matrix, SkShader::TileMode* xy) const {
SkPoint diff = fCenter2 - fCenter1;
- SkScalar diffRadius = fRadius2 - fRadius1;
- SkScalar startRadius = fRadius1;
SkScalar diffLen = 0;
if (bitmap) {
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index c4c2edf17b..5e1bd362b7 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -159,9 +159,9 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn) {
return false;
}
+#if GR_SW_CLIP
bool requiresAA = requires_AA(*clipDataIn->fClipStack);
-#if GR_SW_CLIP
// If MSAA is enabled we can do everything in the stencil buffer.
// Otherwise check if we should just create the entire clip mask
// in software (this will only happen if the clip mask is anti-aliased
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index ff29bd4028..664f1c02fd 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -947,7 +947,7 @@ void GrGLProgram::genStageCode(int stageNum,
} else {
uniforms.fTextureMatrixUni = builder->addUniform(GrGLShaderBuilder::kVertex_ShaderType,
kMat33f_GrSLType, "TexM", &matName);
- const GrGLShaderVar& mat = builder->getUniformVariable(uniforms.fTextureMatrixUni);
+ builder->getUniformVariable(uniforms.fTextureMatrixUni);
if (desc.fOptFlags & StageDesc::kNoPerspective_OptFlagBit) {
texCoordVaryingType = kVec2f_GrSLType;
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 33c79b401b..8d55abb017 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1655,12 +1655,14 @@ void GrGpuGL::onGpuDrawNonIndexed(GrPrimitiveType type,
}
namespace {
+
+static const uint16_t kOnes16 = static_cast<uint16_t>(~0);
const GrStencilSettings& winding_nv_path_stencil_settings() {
GR_STATIC_CONST_SAME_STENCIL_STRUCT(gSettings,
kIncClamp_StencilOp,
kIncClamp_StencilOp,
kAlwaysIfInClip_StencilFunc,
- ~0, ~0, ~0);
+ kOnes16, kOnes16, kOnes16);
return *GR_CONST_STENCIL_SETTINGS_PTR_FROM_STRUCT_PTR(&gSettings);
}
const GrStencilSettings& even_odd_nv_path_stencil_settings() {
@@ -1668,7 +1670,7 @@ const GrStencilSettings& even_odd_nv_path_stencil_settings() {
kInvert_StencilOp,
kInvert_StencilOp,
kAlwaysIfInClip_StencilFunc,
- ~0, ~0, ~0);
+ kOnes16, kOnes16, kOnes16);
return *GR_CONST_STENCIL_SETTINGS_PTR_FROM_STRUCT_PTR(&gSettings);
}
}
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 81ebcbdc80..bbd3ae8801 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -470,7 +470,7 @@ void DeferredDevice::recordedDrawCommand() {
this->flushPending();
// Free as much as possible to avoid oscillating around fMaxRecordingStorageBytes
// which could cause a high flushing frequency.
- this->freeMemoryIfPossible(~0);
+ this->freeMemoryIfPossible(~0U);
}
storageAllocated = this->storageAllocatedForRecording();
}