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
diff --git a/samplecode/SampleCircle.cpp b/samplecode/SampleCircle.cpp
index aca7460..f65ba01 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 15ad809..1169725 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 b1311ee..f72c519 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -260,7 +260,7 @@
         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 c97c228..988345c 100644
--- a/samplecode/SampleRepeatTile.cpp
+++ b/samplecode/SampleRepeatTile.cpp
@@ -77,7 +77,7 @@
         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 acbb808..6d8fb62 100644
--- a/src/animator/SkAnimator.cpp
+++ b/src/animator/SkAnimator.cpp
@@ -223,8 +223,8 @@
     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 @@
 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 @@
 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 @@
 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 @@
 #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 @@
         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 f1f82e3..ea832dc 100644
--- a/src/animator/SkDisplayMovie.cpp
+++ b/src/animator/SkDisplayMovie.cpp
@@ -101,7 +101,7 @@
 }
 #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 4604a71..2a482d7 100644
--- a/src/animator/SkDrawBitmap.cpp
+++ b/src/animator/SkDrawBitmap.cpp
@@ -85,7 +85,7 @@
 }
 #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 af0f04b..b6bc261 100644
--- a/src/animator/SkDrawColor.cpp
+++ b/src/animator/SkDrawColor.cpp
@@ -133,7 +133,7 @@
     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 @@
     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 e624d19..e973dbf 100644
--- a/src/animator/SkDrawExtraPathEffect.cpp
+++ b/src/animator/SkDrawExtraPathEffect.cpp
@@ -415,7 +415,7 @@
 
 class SkExtraPathEffects : public SkExtras {
 public:
-    SkExtraPathEffects(SkAnimator* animator) :
+    SkExtraPathEffects() :
             skDrawShape1DPathEffectType(SkType_Unknown),
             skDrawShape2DPathEffectType(SkType_Unknown),
             skDrawComposePathEffectType(SkType_Unknown),
@@ -504,9 +504,8 @@
     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 c569434..f4bc3c6 100644
--- a/src/animator/SkDrawGroup.cpp
+++ b/src/animator/SkDrawGroup.cpp
@@ -196,7 +196,7 @@
     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 563b0e1..9f297e9 100644
--- a/src/animator/SkDump.cpp
+++ b/src/animator/SkDump.cpp
@@ -135,7 +135,7 @@
 
 DEFINE_GET_MEMBER(SkDump);
 
-bool SkDump::enable(SkAnimateMaker& maker ) {
+bool SkDump::enable(SkAnimateMaker&) {
     return true;
 }
 
@@ -143,7 +143,7 @@
     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 96b1747..3ac521a 100644
--- a/src/animator/SkHitClear.cpp
+++ b/src/animator/SkHitClear.cpp
@@ -19,7 +19,7 @@
 
 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 7506edc..79dd25b 100644
--- a/src/animator/SkHitTest.cpp
+++ b/src/animator/SkHitTest.cpp
@@ -25,7 +25,7 @@
 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 @@
     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 @@
     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 da47178..22119a4 100644
--- a/src/animator/SkPaintParts.cpp
+++ b/src/animator/SkPaintParts.cpp
@@ -92,7 +92,7 @@
 }
 
 #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 00e75b4..0e7ac66 100644
--- a/src/core/SkPtrRecorder.h
+++ b/src/core/SkPtrRecorder.h
@@ -59,8 +59,8 @@
     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 ada0078..3245355 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -193,10 +193,6 @@
 #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 @@
                      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 @@
 #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 8f56d77..31c6b09 100644
--- a/src/gpu/effects/GrEllipseEdgeEffect.h
+++ b/src/gpu/effects/GrEllipseEdgeEffect.h
@@ -38,7 +38,7 @@
 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 0348fd7..048ff08 100644
--- a/src/views/SkViewPriv.cpp
+++ b/src/views/SkViewPriv.cpp
@@ -21,7 +21,7 @@
     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 @@
     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 7331976..f25eb12 100644
--- a/src/views/SkWindow.cpp
+++ b/src/views/SkWindow.cpp
@@ -348,12 +348,12 @@
     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 5b6f101..a206445 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -32,7 +32,7 @@
 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 @@
     return false;
 }
 
-bool SkOSWindow::onHandleKey(SkKey key) {
+bool SkOSWindow::onHandleKey(SkKey) {
     return false;
 }
 
-bool SkOSWindow::onHandleKeyUp(SkKey key) {
+bool SkOSWindow::onHandleKeyUp(SkKey) {
     return false;
 }