aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gyp/tools.gyp4
-rw-r--r--include/core/SkCanvas.h6
-rw-r--r--include/core/SkDevice.h6
-rw-r--r--include/core/SkImageDecoder.h9
-rw-r--r--include/core/SkPixelRef.h2
-rw-r--r--include/core/SkShader.h2
-rw-r--r--include/core/SkStream.h4
-rw-r--r--include/core/SkTArray.h4
-rw-r--r--include/effects/SkGradientShader.h10
-rw-r--r--include/gpu/GrColor.h2
-rw-r--r--include/gpu/GrContext.h2
-rw-r--r--include/ports/SkFontConfigInterface.h4
-rw-r--r--include/utils/SkCamera.h4
-rw-r--r--include/utils/SkDeferredCanvas.h3
-rw-r--r--include/views/SkView.h6
15 files changed, 35 insertions, 33 deletions
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index 30e3e9ea0d..23790a6a3f 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -628,7 +628,9 @@
{
'target_name': 'test_public_includes',
'type': 'static_library',
- #'cflags!': [ '-Wno-unused-parameter' ],
+ # Ensure that our public headers don't have unused params so that clients
+ # (e.g. Android) that include us can build with these warnings enabled
+ 'cflags!': [ '-Wno-unused-parameter' ],
'variables': {
'includes_to_test': [
'<(skia_include_path)/animator',
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 0cb762afed..276b39236f 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1078,7 +1078,7 @@ public:
subclasses like SkPicture's recording canvas, that can store the data
and then play it back later (via another call to drawData).
*/
- virtual void drawData(const void* data, size_t length) {
+ virtual void drawData(const void* /*data*/, size_t /*length*/) {
// do nothing. Subclasses may do something with the data
}
@@ -1086,10 +1086,10 @@ public:
Each comment added via addComment is notionally attached to its
enclosing group. Top-level comments simply belong to no group.
*/
- virtual void beginCommentGroup(const char* description) {
+ virtual void beginCommentGroup(const char* /*description*/) {
// do nothing. Subclasses may do something
}
- virtual void addComment(const char* kywd, const char* value) {
+ virtual void addComment(const char* /*kywd*/, const char* /*value*/) {
// do nothing. Subclasses may do something
}
virtual void endCommentGroup() {
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 43cb32c8c9..471a76be8e 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -281,8 +281,8 @@ protected:
* it just returns false and leaves result and offset unchanged.
*/
virtual bool filterImage(const SkImageFilter*, const SkBitmap&,
- const SkImageFilter::Context& ctx,
- SkBitmap* result, SkIPoint* offset) {
+ const SkImageFilter::Context&,
+ SkBitmap* /*result*/, SkIPoint* /*offset*/) {
return false;
}
@@ -352,7 +352,7 @@ protected:
const SkPixelGeometry fPixelGeometry;
};
- virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& cinfo) {
+ virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) {
return NULL;
}
diff --git a/include/core/SkImageDecoder.h b/include/core/SkImageDecoder.h
index 21077cccff..b384708d30 100644
--- a/include/core/SkImageDecoder.h
+++ b/include/core/SkImageDecoder.h
@@ -348,13 +348,13 @@ protected:
// If the decoder wants to support tiled based decoding,
// this method must be overridden. This guy is called by buildTileIndex(...)
- virtual bool onBuildTileIndex(SkStreamRewindable*, int *width, int *height) {
+ virtual bool onBuildTileIndex(SkStreamRewindable*, int* /*width*/, int* /*height*/) {
return false;
}
// If the decoder wants to support tiled based decoding,
// this method must be overridden. This guy is called by decodeRegion(...)
- virtual bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) {
+ virtual bool onDecodeSubset(SkBitmap*, const SkIRect&) {
return false;
}
@@ -364,8 +364,9 @@ protected:
updates componentSizes to the final image size.
Returns whether the decoding was successful.
*/
- virtual bool onDecodeYUV8Planes(SkStream* stream, SkISize componentSizes[3], void* planes[3],
- size_t rowBytes[3], SkYUVColorSpace*) {
+ virtual bool onDecodeYUV8Planes(SkStream*, SkISize[3] /*componentSizes*/,
+ void*[3] /*planes*/, size_t[3] /*rowBytes*/,
+ SkYUVColorSpace*) {
return false;
}
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 02d696edd8..6f0421e3c4 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -247,7 +247,7 @@ public:
* not be created with the given config), or this PixelRef does not support deep
* copies.
*/
- virtual SkPixelRef* deepCopy(SkColorType colortype, const SkIRect* subset) {
+ virtual SkPixelRef* deepCopy(SkColorType, const SkIRect* /*subset*/) {
return NULL;
}
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 0fbc1b8bd6..151511884a 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -366,7 +366,7 @@ public:
const SkXfermode* fMode;
};
- virtual bool asACompose(ComposeRec* rec) const { return false; }
+ virtual bool asACompose(ComposeRec*) const { return false; }
/**
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index 8e3f375519..913286bdb4 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -102,13 +102,13 @@ public:
* If an attempt is made to seek past the end of the stream, the position will be set
* to the end of the stream.
*/
- virtual bool seek(size_t position) { return false; }
+ virtual bool seek(size_t /*position*/) { return false; }
/** Seeks to an relative offset in the stream. If this cannot be done, returns false.
* If an attempt is made to move to a position outside the stream, the position will be set
* to the closest point within the stream (beginning or end).
*/
- virtual bool move(long offset) { return false; }
+ virtual bool move(long /*offset*/) { return false; }
/** Duplicates this stream. If this cannot be done, returns NULL.
* The returned stream will be positioned the same as this stream.
diff --git a/include/core/SkTArray.h b/include/core/SkTArray.h
index 06a85bc439..9de21179f0 100644
--- a/include/core/SkTArray.h
+++ b/include/core/SkTArray.h
@@ -464,7 +464,7 @@ private:
// Use the below macro (SkNEW_APPEND_TO_TARRAY) rather than calling this directly
template <typename T, bool MEM_COPY>
-void* operator new(size_t, SkTArray<T, MEM_COPY>* array, int atIndex) {
+void* operator new(size_t, SkTArray<T, MEM_COPY>* array, int SkDEBUGCODE(atIndex)) {
// Currently, we only support adding to the end of the array. When the array class itself
// supports random insertion then this should be updated.
// SkASSERT(atIndex >= 0 && atIndex <= array->count());
@@ -476,7 +476,7 @@ void* operator new(size_t, SkTArray<T, MEM_COPY>* array, int atIndex) {
// to match the op new silences warnings about missing op delete when a constructor throws an
// exception.
template <typename T, bool MEM_COPY>
-void operator delete(void*, SkTArray<T, MEM_COPY>* array, int atIndex) {
+void operator delete(void*, SkTArray<T, MEM_COPY>* /*array*/, int /*atIndex*/) {
SK_CRASH();
}
diff --git a/include/effects/SkGradientShader.h b/include/effects/SkGradientShader.h
index 8d1a93107d..2d2fefe5cf 100644
--- a/include/effects/SkGradientShader.h
+++ b/include/effects/SkGradientShader.h
@@ -58,7 +58,7 @@ public:
#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES
static SkShader* CreateLinear(const SkPoint pts[2],
const SkColor colors[], const SkScalar pos[], int count,
- SkShader::TileMode mode, void* ignored,
+ SkShader::TileMode mode, void* /*ignored*/,
uint32_t flags, const SkMatrix* localMatrix) {
return CreateLinear(pts, colors, pos, count, mode, flags, localMatrix);
}
@@ -94,7 +94,7 @@ public:
#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES
static SkShader* CreateRadial(const SkPoint& center, SkScalar radius,
const SkColor colors[], const SkScalar pos[], int count,
- SkShader::TileMode mode, void* ignored,
+ SkShader::TileMode mode, void* /*ignored*/,
uint32_t flags, const SkMatrix* localMatrix) {
return CreateRadial(center, radius, colors, pos, count, mode, flags, localMatrix);
}
@@ -137,7 +137,7 @@ public:
static SkShader* CreateTwoPointRadial(const SkPoint& start, SkScalar startRadius,
const SkPoint& end, SkScalar endRadius,
const SkColor colors[], const SkScalar pos[], int count,
- SkShader::TileMode mode, void* ignored,
+ SkShader::TileMode mode, void* /*ignored*/,
uint32_t flags, const SkMatrix* localMatrix) {
return CreateTwoPointRadial(start, startRadius, end, endRadius, colors, pos, count, mode,
flags, localMatrix);
@@ -168,7 +168,7 @@ public:
static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius,
const SkPoint& end, SkScalar endRadius,
const SkColor colors[], const SkScalar pos[], int count,
- SkShader::TileMode mode, void* ignored,
+ SkShader::TileMode mode, void* /*ignored*/,
uint32_t flags, const SkMatrix* localMatrix) {
return CreateTwoPointConical(start, startRadius, end, endRadius, colors, pos, count, mode,
flags, localMatrix);
@@ -202,7 +202,7 @@ public:
#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES
static SkShader* CreateSweep(SkScalar cx, SkScalar cy,
const SkColor colors[], const SkScalar pos[], int count,
- void* ignored,
+ void* /*ignored*/,
uint32_t flags, const SkMatrix* localMatrix) {
return CreateSweep(cx, cy, colors, pos, count, flags, localMatrix);
}
diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h
index 3470c88fe6..bd949cebe8 100644
--- a/include/gpu/GrColor.h
+++ b/include/gpu/GrColor.h
@@ -66,7 +66,7 @@ static inline GrColor GrColorPackRGBA(unsigned r, unsigned g,
/**
* Assert in debug builds that a GrColor is premultiplied.
*/
-static inline void GrColorIsPMAssert(GrColor c) {
+static inline void GrColorIsPMAssert(GrColor SkDEBUGCODE(c)) {
#ifdef SK_DEBUG
unsigned a = GrColorUnpackA(c);
unsigned r = GrColorUnpackR(c);
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 97acda1e79..ccc07c77aa 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -827,7 +827,7 @@ public:
kWideOpen_InitialClip,
};
- AutoClip(GrContext* context, InitialClip initialState)
+ AutoClip(GrContext* context, InitialClip SkDEBUGCODE(initialState))
: fContext(context) {
SkASSERT(kWideOpen_InitialClip == initialState);
fNewClipData.fClipStack = &fNewClipStack;
diff --git a/include/ports/SkFontConfigInterface.h b/include/ports/SkFontConfigInterface.h
index c596267db4..7a77b16e35 100644
--- a/include/ports/SkFontConfigInterface.h
+++ b/include/ports/SkFontConfigInterface.h
@@ -105,8 +105,8 @@ public:
// New APIS, which have default impls for now (which do nothing)
virtual SkDataTable* getFamilyNames() { return SkDataTable::NewEmpty(); }
- virtual bool matchFamilySet(const char inFamilyName[],
- SkString* outFamilyName,
+ virtual bool matchFamilySet(const char[] /*inFamilyName*/,
+ SkString* /*outFamilyName*/,
SkTArray<FontIdentity>*) {
return false;
}
diff --git a/include/utils/SkCamera.h b/include/utils/SkCamera.h
index b515be9c6c..4b77ec685d 100644
--- a/include/utils/SkCamera.h
+++ b/include/utils/SkCamera.h
@@ -84,8 +84,8 @@ public:
}
// deprecated, but still here for animator (for now)
- void rotate(SkScalar x, SkScalar y, SkScalar z) {}
- void rotateDegrees(SkScalar x, SkScalar y, SkScalar z) {}
+ void rotate(SkScalar /*x*/, SkScalar /*y*/, SkScalar /*z*/) {}
+ void rotateDegrees(SkScalar /*x*/, SkScalar /*y*/, SkScalar /*z*/) {}
private:
public: // make public for SkDraw3D for now
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h
index 5f781f8859..69c8c3e5e6 100644
--- a/include/utils/SkDeferredCanvas.h
+++ b/include/utils/SkDeferredCanvas.h
@@ -222,8 +222,7 @@ public:
* @param newAllocatedStorage same value as would be returned by
* storageAllocatedForRecording(), for convenience.
*/
- virtual void storageAllocatedForRecordingChanged(
- size_t newAllocatedStorage) {}
+ virtual void storageAllocatedForRecordingChanged(size_t /*newAllocatedStorage*/) {}
/**
* Called after pending draw commands have been flushed
diff --git a/include/views/SkView.h b/include/views/SkView.h
index c083cf1bb8..db712317e5 100644
--- a/include/views/SkView.h
+++ b/include/views/SkView.h
@@ -337,12 +337,12 @@ protected:
//! called once before all of the children are drawn (or clipped/translated)
virtual SkCanvas* beforeChildren(SkCanvas* c) { return c; }
//! called once after all of the children are drawn (or clipped/translated)
- virtual void afterChildren(SkCanvas* orig) {}
+ virtual void afterChildren(SkCanvas*) {}
//! called right before this child's onDraw is called
- virtual void beforeChild(SkView* child, SkCanvas* canvas) {}
+ virtual void beforeChild(SkView* /*child*/, SkCanvas*) {}
//! called right after this child's onDraw is called
- virtual void afterChild(SkView* child, SkCanvas* canvas) {}
+ virtual void afterChild(SkView* /*child*/, SkCanvas*) {}
/** Override this if you might handle the click
*/