aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-12 14:36:57 +0000
committerGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-12 14:36:57 +0000
commit93c7ee34dc5c8f6bfad65809f4b39f8d00d7f0d4 (patch)
treed4352361bd821b020d856cc720feb3235f8d9203
parenta041b954ffd318ebbbee9aab1c11f8c563954a1f (diff)
Removed unused parameters
I removed unused parameters wherever it was trivial to do so. Review URL: https://codereview.chromium.org/12772003 git-svn-id: http://skia.googlecode.com/svn/trunk@8103 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--samplecode/SampleCircle.cpp2
-rw-r--r--samplecode/SampleEffects.cpp2
-rw-r--r--samplecode/SampleLayers.cpp2
-rw-r--r--samplecode/SampleRepeatTile.cpp2
-rw-r--r--src/animator/SkAnimator.cpp16
-rw-r--r--src/animator/SkDisplayMovie.cpp2
-rw-r--r--src/animator/SkDrawBitmap.cpp2
-rw-r--r--src/animator/SkDrawColor.cpp4
-rw-r--r--src/animator/SkDrawExtraPathEffect.cpp5
-rw-r--r--src/animator/SkDrawGroup.cpp2
-rw-r--r--src/animator/SkDump.cpp4
-rw-r--r--src/animator/SkHitClear.cpp2
-rw-r--r--src/animator/SkHitTest.cpp6
-rw-r--r--src/animator/SkPaintParts.cpp2
-rw-r--r--src/core/SkPtrRecorder.h4
-rw-r--r--src/core/SkScan_Hairline.cpp13
-rw-r--r--src/gpu/effects/GrEllipseEdgeEffect.h2
-rw-r--r--src/views/SkViewPriv.cpp4
-rw-r--r--src/views/SkWindow.cpp4
-rw-r--r--src/views/unix/SkOSWindow_Unix.cpp6
20 files changed, 39 insertions, 47 deletions
diff --git a/samplecode/SampleCircle.cpp b/samplecode/SampleCircle.cpp
index aca74603d3..f65ba01abc 100644
--- a/samplecode/SampleCircle.cpp
+++ b/samplecode/SampleCircle.cpp
@@ -15,7 +15,7 @@
// fractional, and the impl computes the center and radii, and uses them to
// reconstruct the edges of the circle.
// see bug# 1504910
-static void test_circlebounds(SkCanvas* canvas) {
+static void test_circlebounds(SkCanvas*) {
#ifdef SK_SCALAR_IS_FLOAT
SkRect r = { 1.39999998f, 1, 21.3999996f, 21 };
SkPath p;
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp
index 15ad809d17..1169725fa0 100644
--- a/samplecode/SampleEffects.cpp
+++ b/samplecode/SampleEffects.cpp
@@ -18,7 +18,7 @@
//#define COLOR 0xFFFF8844
#define COLOR 0xFF888888
-static void paint_proc0(SkPaint* paint) {
+static void paint_proc0(SkPaint*) {
}
static void paint_proc1(SkPaint* paint) {
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index b1311ee576..f72c519faf 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -260,7 +260,7 @@ protected:
return this->INHERITED::onClick(click);
}
- virtual bool handleKey(SkKey key) {
+ virtual bool handleKey(SkKey) {
this->inval(NULL);
return true;
}
diff --git a/samplecode/SampleRepeatTile.cpp b/samplecode/SampleRepeatTile.cpp
index c97c228ed7..988345c0fc 100644
--- a/samplecode/SampleRepeatTile.cpp
+++ b/samplecode/SampleRepeatTile.cpp
@@ -77,7 +77,7 @@ protected:
return this->INHERITED::onClick(click);
}
- virtual bool handleKey(SkKey key) {
+ virtual bool handleKey(SkKey) {
this->inval(NULL);
return true;
}
diff --git a/src/animator/SkAnimator.cpp b/src/animator/SkAnimator.cpp
index acbb808c5c..6d8fb62db5 100644
--- a/src/animator/SkAnimator.cpp
+++ b/src/animator/SkAnimator.cpp
@@ -223,8 +223,8 @@ SkFieldType SkAnimator::getFieldType(const char* id, const char* fieldID) {
return getFieldType(field);
}
- static bool getArrayCommon(const SkDisplayable* ae, const SkMemberInfo* ai,
- int index, SkOperand* operand, SkDisplayTypes type) {
+static bool getArrayCommon(const SkDisplayable* ae, const SkMemberInfo* ai,
+ int index, SkOperand* operand) {
const SkDisplayable* element = (const SkDisplayable*) ae;
const SkMemberInfo* info = (const SkMemberInfo*) ai;
SkASSERT(info->fType == SkType_Array);
@@ -234,7 +234,7 @@ SkFieldType SkAnimator::getFieldType(const char* id, const char* fieldID) {
int32_t SkAnimator::getArrayInt(const SkDisplayable* ae,
const SkMemberInfo* ai, int index) {
SkOperand operand;
- bool result = getArrayCommon(ae, ai, index, &operand, SkType_Int);
+ bool result = getArrayCommon(ae, ai, index, &operand);
return result ? operand.fS32 : SK_NaN32;
}
@@ -251,7 +251,7 @@ int32_t SkAnimator::getArrayInt(const char* id, const char* fieldID, int index)
SkScalar SkAnimator::getArrayScalar(const SkDisplayable* ae,
const SkMemberInfo* ai, int index) {
SkOperand operand;
- bool result = getArrayCommon(ae, ai, index, &operand, SkType_Float);
+ bool result = getArrayCommon(ae, ai, index, &operand);
return result ? operand.fScalar : SK_ScalarNaN;
}
@@ -268,7 +268,7 @@ SkScalar SkAnimator::getArrayScalar(const char* id, const char* fieldID, int ind
const char* SkAnimator::getArrayString(const SkDisplayable* ae,
const SkMemberInfo* ai, int index) {
SkOperand operand;
- bool result = getArrayCommon(ae, ai, index, &operand, SkType_String);
+ bool result = getArrayCommon(ae, ai, index, &operand);
return result ? operand.fString->c_str() : NULL;
}
@@ -674,8 +674,8 @@ bool SkAnimator::NoLeaks() {
#endif
-void SkAnimator::Init(bool runUnitTests) {
#ifdef SK_SUPPORT_UNITTEST
+void SkAnimator::Init(bool runUnitTests) {
if (runUnitTests == false)
return;
static const struct {
@@ -695,8 +695,10 @@ void SkAnimator::Init(bool runUnitTests) {
gUnitTests[i].fUnitTest();
SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName);
}
-#endif
}
+#else
+void SkAnimator::Init(bool) {}
+#endif
void SkAnimator::Term() {
}
diff --git a/src/animator/SkDisplayMovie.cpp b/src/animator/SkDisplayMovie.cpp
index f1f82e3201..ea832dcb4c 100644
--- a/src/animator/SkDisplayMovie.cpp
+++ b/src/animator/SkDisplayMovie.cpp
@@ -101,7 +101,7 @@ void SkDisplayMovie::dumpEvents() {
}
#endif
-bool SkDisplayMovie::enable(SkAnimateMaker& maker) {
+bool SkDisplayMovie::enable(SkAnimateMaker&) {
if (fDecodedSuccessfully == false)
return false;
SkAnimateMaker* movieMaker = fMovie.fMaker;
diff --git a/src/animator/SkDrawBitmap.cpp b/src/animator/SkDrawBitmap.cpp
index 4604a7110c..2a482d7584 100644
--- a/src/animator/SkDrawBitmap.cpp
+++ b/src/animator/SkDrawBitmap.cpp
@@ -85,7 +85,7 @@ void SkDrawBitmap::dump(SkAnimateMaker* maker) {
}
#endif
-void SkDrawBitmap::onEndElement(SkAnimateMaker& maker) {
+void SkDrawBitmap::onEndElement(SkAnimateMaker&) {
SkASSERT(format != (SkBitmap::Config) -1);
SkASSERT(width != -1);
SkASSERT(height != -1);
diff --git a/src/animator/SkDrawColor.cpp b/src/animator/SkDrawColor.cpp
index af0f04b910..b6bc261d71 100644
--- a/src/animator/SkDrawColor.cpp
+++ b/src/animator/SkDrawColor.cpp
@@ -133,7 +133,7 @@ bool SkDrawColor::add() {
return false;
}
-SkDisplayable* SkDrawColor::deepCopy(SkAnimateMaker* maker) {
+SkDisplayable* SkDrawColor::deepCopy(SkAnimateMaker*) {
SkDrawColor* copy = new SkDrawColor();
copy->color = color;
copy->fHue = fHue;
@@ -206,7 +206,7 @@ bool SkDrawColor::getProperty(int index, SkScriptValue* value) const {
return true;
}
-void SkDrawColor::onEndElement(SkAnimateMaker& maker){
+void SkDrawColor::onEndElement(SkAnimateMaker&) {
fDirty = true;
}
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp
index e624d195c0..e973dbf795 100644
--- a/src/animator/SkDrawExtraPathEffect.cpp
+++ b/src/animator/SkDrawExtraPathEffect.cpp
@@ -415,7 +415,7 @@ const char kDrawCornerPathEffectName[] = "pathEffect:corner";
class SkExtraPathEffects : public SkExtras {
public:
- SkExtraPathEffects(SkAnimator* animator) :
+ SkExtraPathEffects() :
skDrawShape1DPathEffectType(SkType_Unknown),
skDrawShape2DPathEffectType(SkType_Unknown),
skDrawComposePathEffectType(SkType_Unknown),
@@ -504,9 +504,8 @@ private:
SkDisplayTypes skDrawCornerPathEffectType;
};
-
void InitializeSkExtraPathEffects(SkAnimator* animator) {
- animator->addExtras(new SkExtraPathEffects(animator));
+ animator->addExtras(new SkExtraPathEffects());
}
////////////////
diff --git a/src/animator/SkDrawGroup.cpp b/src/animator/SkDrawGroup.cpp
index c56943462b..f4bc3c6308 100644
--- a/src/animator/SkDrawGroup.cpp
+++ b/src/animator/SkDrawGroup.cpp
@@ -196,7 +196,7 @@ bool SkGroup::hasEnable() const {
return true;
}
-bool SkGroup::ifCondition(SkAnimateMaker& maker, SkDrawable* drawable,
+bool SkGroup::ifCondition(SkAnimateMaker& maker, SkDrawable*,
SkString& conditionString) {
if (conditionString.size() == 0)
return true;
diff --git a/src/animator/SkDump.cpp b/src/animator/SkDump.cpp
index 563b0e104c..9f297e9d58 100644
--- a/src/animator/SkDump.cpp
+++ b/src/animator/SkDump.cpp
@@ -135,7 +135,7 @@ const SkMemberInfo SkDump::fInfo[] = {
DEFINE_GET_MEMBER(SkDump);
-bool SkDump::enable(SkAnimateMaker& maker ) {
+bool SkDump::enable(SkAnimateMaker&) {
return true;
}
@@ -143,7 +143,7 @@ bool SkDump::hasEnable() const {
return true;
}
-bool SkDump::setProperty(int index, SkScriptValue& ) {
+bool SkDump::setProperty(int index, SkScriptValue&) {
return index <= SK_PROPERTY(posts);
}
diff --git a/src/animator/SkHitClear.cpp b/src/animator/SkHitClear.cpp
index 96b1747596..3ac521ae64 100644
--- a/src/animator/SkHitClear.cpp
+++ b/src/animator/SkHitClear.cpp
@@ -19,7 +19,7 @@ const SkMemberInfo SkHitClear::fInfo[] = {
DEFINE_GET_MEMBER(SkHitClear);
-bool SkHitClear::enable(SkAnimateMaker& maker) {
+bool SkHitClear::enable(SkAnimateMaker&) {
for (int tIndex = 0; tIndex < targets.count(); tIndex++) {
SkDisplayable* target = targets[tIndex];
target->clearBounder();
diff --git a/src/animator/SkHitTest.cpp b/src/animator/SkHitTest.cpp
index 7506edc70e..79dd25bd5c 100644
--- a/src/animator/SkHitTest.cpp
+++ b/src/animator/SkHitTest.cpp
@@ -25,7 +25,7 @@ DEFINE_GET_MEMBER(SkHitTest);
SkHitTest::SkHitTest() : value(false) {
}
-bool SkHitTest::draw(SkAnimateMaker& maker) {
+bool SkHitTest::draw(SkAnimateMaker&) {
hits.setCount(bullets.count());
value = false;
int bulletCount = bullets.count();
@@ -51,7 +51,7 @@ bool SkHitTest::draw(SkAnimateMaker& maker) {
return false;
}
-bool SkHitTest::enable(SkAnimateMaker& maker) {
+bool SkHitTest::enable(SkAnimateMaker&) {
for (int bIndex = 0; bIndex < bullets.count(); bIndex++) {
SkDisplayable* bullet = bullets[bIndex];
bullet->enableBounder();
@@ -67,7 +67,7 @@ bool SkHitTest::hasEnable() const {
return true;
}
-const SkMemberInfo* SkHitTest::preferredChild(SkDisplayTypes type) {
+const SkMemberInfo* SkHitTest::preferredChild(SkDisplayTypes) {
if (bullets.count() == 0)
return getMember("bullets");
return getMember("targets"); // !!! cwap! need to refer to member through enum like kScope instead
diff --git a/src/animator/SkPaintParts.cpp b/src/animator/SkPaintParts.cpp
index da47178261..22119a4ff9 100644
--- a/src/animator/SkPaintParts.cpp
+++ b/src/animator/SkPaintParts.cpp
@@ -92,7 +92,7 @@ bool SkDrawTypeface::add() {
}
#ifdef SK_DUMP_ENABLED
-void SkDrawTypeface::dump(SkAnimateMaker* maker) {
+void SkDrawTypeface::dump(SkAnimateMaker*) {
SkDebugf("%*s<typeface fontName=\"%s\" ", SkDisplayList::fIndent, "", fontName.c_str());
SkString string;
SkDump::GetEnumString(SkType_FontStyle, style, &string);
diff --git a/src/core/SkPtrRecorder.h b/src/core/SkPtrRecorder.h
index 00e75b433f..0e7ac66548 100644
--- a/src/core/SkPtrRecorder.h
+++ b/src/core/SkPtrRecorder.h
@@ -59,8 +59,8 @@ public:
void reset();
protected:
- virtual void incPtr(void* ptr) {}
- virtual void decPtr(void* ptr) {}
+ virtual void incPtr(void*) {}
+ virtual void decPtr(void*) {}
private:
struct Pair {
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index ada0078e3c..3245355a5d 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -193,10 +193,6 @@ void SkScan::HairRect(const SkRect& rect, const SkRasterClip& clip,
#include "SkPath.h"
#include "SkGeometry.h"
-static bool quad_too_curvy(const SkPoint pts[3]) {
- return true;
-}
-
static int compute_int_quad_dist(const SkPoint pts[3]) {
// compute the vector between the control point ([1]) and the middle of the
// line connecting the start and end ([0] and [2])
@@ -220,7 +216,7 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip, SkBlitter* blit
void (*lineproc)(const SkPoint&, const SkPoint&, const SkRegion* clip, SkBlitter*))
{
#if 1
- if (level > 0 && quad_too_curvy(pts))
+ if (level > 0)
{
SkPoint tmp[5];
@@ -247,15 +243,10 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip, SkBlitter* blit
#endif
}
-static bool cubic_too_curvy(const SkPoint pts[4])
-{
- return true;
-}
-
static void haircubic(const SkPoint pts[4], const SkRegion* clip, SkBlitter* blitter, int level,
void (*lineproc)(const SkPoint&, const SkPoint&, const SkRegion*, SkBlitter*))
{
- if (level > 0 && cubic_too_curvy(pts))
+ if (level > 0)
{
SkPoint tmp[7];
diff --git a/src/gpu/effects/GrEllipseEdgeEffect.h b/src/gpu/effects/GrEllipseEdgeEffect.h
index 8f56d771df..31c6b09a0f 100644
--- a/src/gpu/effects/GrEllipseEdgeEffect.h
+++ b/src/gpu/effects/GrEllipseEdgeEffect.h
@@ -38,7 +38,7 @@ public:
private:
GrEllipseEdgeEffect();
- virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
+ virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE {
return true;
}
diff --git a/src/views/SkViewPriv.cpp b/src/views/SkViewPriv.cpp
index 0348fd7e32..048ff08b87 100644
--- a/src/views/SkViewPriv.cpp
+++ b/src/views/SkViewPriv.cpp
@@ -21,7 +21,7 @@ void SkView::Artist::inflate(const SkDOM& dom, const SkDOM::Node* node)
this->onInflate(dom, node);
}
-void SkView::Artist::onInflate(const SkDOM& dom, const SkDOM::Node* node)
+void SkView::Artist::onInflate(const SkDOM&, const SkDOM::Node*)
{
// subclass should override this as needed
}
@@ -67,7 +67,7 @@ void SkView::Layout::inflate(const SkDOM& dom, const SkDOM::Node* node)
this->onInflate(dom, node);
}
-void SkView::Layout::onInflate(const SkDOM& dom, const SkDOM::Node* node)
+void SkView::Layout::onInflate(const SkDOM&, const SkDOM::Node*)
{
// subclass should override this as needed
}
diff --git a/src/views/SkWindow.cpp b/src/views/SkWindow.cpp
index 73319766c5..f25eb12379 100644
--- a/src/views/SkWindow.cpp
+++ b/src/views/SkWindow.cpp
@@ -348,12 +348,12 @@ bool SkWindow::onHandleChar(SkUnichar)
return false;
}
-bool SkWindow::onHandleKey(SkKey key)
+bool SkWindow::onHandleKey(SkKey)
{
return false;
}
-bool SkWindow::onHandleKeyUp(SkKey key)
+bool SkWindow::onHandleKeyUp(SkKey)
{
return false;
}
diff --git a/src/views/unix/SkOSWindow_Unix.cpp b/src/views/unix/SkOSWindow_Unix.cpp
index 5b6f101914..a20644556d 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -32,7 +32,7 @@ const int HEIGHT = 500;
const long EVENT_MASK = StructureNotifyMask|ButtonPressMask|ButtonReleaseMask
|ExposureMask|PointerMotionMask|KeyPressMask|KeyReleaseMask;
-SkOSWindow::SkOSWindow(void* unused)
+SkOSWindow::SkOSWindow(void*)
: fVi(NULL)
, fMSAASampleCount(0) {
fUnixWindow.fDisplay = NULL;
@@ -380,10 +380,10 @@ bool SkOSWindow::onHandleChar(SkUnichar) {
return false;
}
-bool SkOSWindow::onHandleKey(SkKey key) {
+bool SkOSWindow::onHandleKey(SkKey) {
return false;
}
-bool SkOSWindow::onHandleKeyUp(SkKey key) {
+bool SkOSWindow::onHandleKeyUp(SkKey) {
return false;
}