diff options
author | sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-05 18:50:01 +0000 |
---|---|---|
committer | sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-05 18:50:01 +0000 |
commit | 77472f06f88b85e85fb690584c85d0a42e74b685 (patch) | |
tree | 59a891bdb1a17a18aea0f47139e7772694881c8d | |
parent | e2e8113baa69b5d1a0bae9652a095c1eb44b3a53 (diff) |
Bench : Unused parameters cleanup
I removed unused parameters in bench wherever it was trivial to do so.
Review URL: https://codereview.appspot.com/7411046
git-svn-id: http://skia.googlecode.com/svn/trunk@7988 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | bench/AAClipBench.cpp | 4 | ||||
-rw-r--r-- | bench/BlurRectBench.cpp | 6 | ||||
-rw-r--r-- | bench/ChecksumBench.cpp | 2 | ||||
-rw-r--r-- | bench/DashBench.cpp | 4 | ||||
-rw-r--r-- | bench/DecodeBench.cpp | 2 | ||||
-rw-r--r-- | bench/GrMemoryPoolBench.cpp | 6 | ||||
-rw-r--r-- | bench/InterpBench.cpp | 2 | ||||
-rw-r--r-- | bench/MathBench.cpp | 6 | ||||
-rw-r--r-- | bench/Matrix44Bench.cpp | 2 | ||||
-rw-r--r-- | bench/MatrixBench.cpp | 2 | ||||
-rw-r--r-- | bench/MemoryBench.cpp | 2 | ||||
-rw-r--r-- | bench/MutexBench.cpp | 2 | ||||
-rw-r--r-- | bench/PathBench.cpp | 2 | ||||
-rw-r--r-- | bench/PathIterBench.cpp | 2 | ||||
-rw-r--r-- | bench/PictureRecordBench.cpp | 2 | ||||
-rw-r--r-- | bench/RefCntBench.cpp | 16 | ||||
-rw-r--r-- | bench/RegionContainBench.cpp | 2 | ||||
-rw-r--r-- | bench/SortBench.cpp | 2 | ||||
-rw-r--r-- | bench/WriterBench.cpp | 2 |
19 files changed, 34 insertions, 34 deletions
diff --git a/bench/AAClipBench.cpp b/bench/AAClipBench.cpp index f85af68395..276a8ff3e7 100644 --- a/bench/AAClipBench.cpp +++ b/bench/AAClipBench.cpp @@ -208,7 +208,7 @@ public: protected: virtual const char* onGetName() { return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { SkPaint paint; this->setupPaint(&paint); @@ -243,7 +243,7 @@ public: protected: virtual const char* onGetName() { return "aaclip_setregion"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { for (int i = 0; i < N; ++i) { SkAAClip clip; clip.setRegion(fRegion); diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp index 8767deefa2..fec0257e2e 100644 --- a/bench/BlurRectBench.cpp +++ b/bench/BlurRectBench.cpp @@ -49,7 +49,7 @@ protected: fName = name; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { SkPaint paint; this->setupPaint(&paint); @@ -137,7 +137,7 @@ public: protected: - virtual void makeBlurryRect(const SkRect& r) SK_OVERRIDE { + virtual void makeBlurryRect(const SkRect&) SK_OVERRIDE { SkMask mask; mask.fImage = NULL; SkBlurMask::BlurSeparable(&mask, fSrcMask, this->radius(), @@ -163,7 +163,7 @@ public: protected: - virtual void makeBlurryRect(const SkRect& r) SK_OVERRIDE { + virtual void makeBlurryRect(const SkRect&) SK_OVERRIDE { SkMask mask; mask.fImage = NULL; SkBlurMask::BlurGroundTruth(&mask, fSrcMask, this->radius(), diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp index 8226ddd322..5491f0590c 100644 --- a/bench/ChecksumBench.cpp +++ b/bench/ChecksumBench.cpp @@ -51,7 +51,7 @@ protected: } } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { switch (fType) { case kChecksum_ChecksumType: { for (int i = 0; i < N; i++) { diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp index e62fb53253..3853a20488 100644 --- a/bench/DashBench.cpp +++ b/bench/DashBench.cpp @@ -102,7 +102,7 @@ private: class RectDashBench : public DashBench { public: - RectDashBench(void* param, const SkScalar intervals[], int count, int width, bool doClip = false) + RectDashBench(void* param, const SkScalar intervals[], int count, int width) : INHERITED(param, intervals, count, width) { fName.append("_rect"); } @@ -201,7 +201,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas*) SK_OVERRIDE { SkPath dst; for (int i = 0; i < N; ++i) { SkStrokeRec rec(SkStrokeRec::kHairline_InitStyle); diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp index 6593d103f1..c87e6f6484 100644 --- a/bench/DecodeBench.cpp +++ b/bench/DecodeBench.cpp @@ -40,7 +40,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { if (fFilename) { for (int i = 0; i < N; i++) { SkBitmap bm; diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp index d6c4b77393..29c0893f92 100644 --- a/bench/GrMemoryPoolBench.cpp +++ b/bench/GrMemoryPoolBench.cpp @@ -46,7 +46,7 @@ protected: return "grmemorypool_stack"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { SkRandom r; enum { kMaxObjects = 4 * (1 << 10), @@ -102,7 +102,7 @@ protected: return "grmemorypool_random"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { SkRandom r; enum { kMaxObjects = 4 * (1 << 10), @@ -140,7 +140,7 @@ protected: return "grmemorypool_queue"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { SkRandom r; A* objects[M]; for (int i = 0; i < N; i++) { diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp index 086cc3bc99..9b607adf88 100644 --- a/bench/InterpBench.cpp +++ b/bench/InterpBench.cpp @@ -32,7 +32,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { int n = SkBENCHLOOP(kLoop * this->mulLoopCount()); for (int i = 0; i < n; i++) { this->performTest(fDst, fFx, fDx, kBuffer); diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index bdb89cab62..5c80dc0ca6 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -45,7 +45,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { int n = SkBENCHLOOP(kLoop * this->mulLoopCount()); for (int i = 0; i < n; i++) { this->performTest(fDst, fSrc, kBuffer); @@ -271,7 +271,7 @@ public: } protected: - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { IsFiniteProc proc = fProc; const float* data = fData; // do this so the compiler won't throw away the function call @@ -339,7 +339,7 @@ public: virtual void process(float) {} protected: - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { SkRandom rand; float accum = 0; const float* data = fData; diff --git a/bench/Matrix44Bench.cpp b/bench/Matrix44Bench.cpp index 0d9d57293c..dd1de59529 100644 --- a/bench/Matrix44Bench.cpp +++ b/bench/Matrix44Bench.cpp @@ -28,7 +28,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { int n = SkBENCHLOOP(N * this->mulLoopCount()); for (int i = 0; i < n; i++) { this->performTest(); diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp index f739715c68..d1a7dd29e5 100644 --- a/bench/MatrixBench.cpp +++ b/bench/MatrixBench.cpp @@ -28,7 +28,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { int n = SkBENCHLOOP(N * this->mulLoopCount()); for (int i = 0; i < n; i++) { this->performTest(); diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp index ab9c07dd06..3dff98f8c1 100644 --- a/bench/MemoryBench.cpp +++ b/bench/MemoryBench.cpp @@ -31,7 +31,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas*) SK_OVERRIDE { size_t inc = fMinSize >> 4; SkASSERT(inc > 0); size_t total = fMinSize * 64; diff --git a/bench/MutexBench.cpp b/bench/MutexBench.cpp index 6c152a0dc0..d96f3f6600 100644 --- a/bench/MutexBench.cpp +++ b/bench/MutexBench.cpp @@ -21,7 +21,7 @@ protected: return "mutex"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { for (int i = 0; i < N; i++) { SK_DECLARE_STATIC_MUTEX(mu); for (int j = 0; j < M; j++) { diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp index b0794f6c02..658ee96f63 100644 --- a/bench/PathBench.cpp +++ b/bench/PathBench.cpp @@ -819,7 +819,7 @@ private: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas*) SK_OVERRIDE { for (int i = 0; i < N; ++i) { const SkRect& rect = fQueryRects[i % kQueryRectCnt]; fParity = fParity != fPath.conservativelyContainsRect(rect); diff --git a/bench/PathIterBench.cpp b/bench/PathIterBench.cpp index ed99f0a154..8bc8add427 100644 --- a/bench/PathIterBench.cpp +++ b/bench/PathIterBench.cpp @@ -65,7 +65,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas*) SK_OVERRIDE { if (fRaw) { for (int i = 0; i < N; ++i) { SkPath::RawIter iter(fPath); diff --git a/bench/PictureRecordBench.cpp b/bench/PictureRecordBench.cpp index 0f82fda134..c057f6442c 100644 --- a/bench/PictureRecordBench.cpp +++ b/bench/PictureRecordBench.cpp @@ -32,7 +32,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { int n = (int)(N * this->innerLoopScale()); n = SkMax32(1, n); diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp index c8a98e455f..26c98b9fe4 100644 --- a/bench/RefCntBench.cpp +++ b/bench/RefCntBench.cpp @@ -25,7 +25,7 @@ protected: return "ref_cnt_stack"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { for (int i = 0; i < N; ++i) { SkRefCnt ref; for (int j = 0; j < M; ++j) { @@ -44,7 +44,7 @@ public: SK_DECLARE_INST_COUNT(PlacedRefCnt) PlacedRefCnt() : SkRefCnt() { } - void operator delete(void *p) { } + void operator delete(void*) { } private: typedef SkRefCnt INHERITED; @@ -62,7 +62,7 @@ protected: return "ref_cnt_heap"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { char memory[sizeof(PlacedRefCnt)]; for (int i = 0; i < N; ++i) { PlacedRefCnt* ref = new (memory) PlacedRefCnt(); @@ -88,7 +88,7 @@ protected: return "ref_cnt_new"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { for (int i = 0; i < N; ++i) { SkRefCnt* ref = new SkRefCnt(); for (int j = 0; j < M; ++j) { @@ -115,7 +115,7 @@ protected: return "ref_cnt_stack_weak"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { for (int i = 0; i < N; ++i) { SkWeakRefCnt ref; for (int j = 0; j < M; ++j) { @@ -132,7 +132,7 @@ private: class PlacedWeakRefCnt : public SkWeakRefCnt { public: PlacedWeakRefCnt() : SkWeakRefCnt() { } - void operator delete(void *p) { } + void operator delete(void*) { } }; class WeakRefCntBench_Heap : public SkBenchmark { @@ -145,7 +145,7 @@ protected: return "ref_cnt_heap_weak"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { char memory[sizeof(PlacedWeakRefCnt)]; for (int i = 0; i < N; ++i) { PlacedWeakRefCnt* ref = new (memory) PlacedWeakRefCnt(); @@ -171,7 +171,7 @@ protected: return "ref_cnt_new_weak"; } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { for (int i = 0; i < N; ++i) { SkWeakRefCnt* ref = new SkWeakRefCnt(); for (int j = 0; j < M; ++j) { diff --git a/bench/RegionContainBench.cpp b/bench/RegionContainBench.cpp index 1aae264c75..8668513979 100644 --- a/bench/RegionContainBench.cpp +++ b/bench/RegionContainBench.cpp @@ -51,7 +51,7 @@ public: protected: virtual const char* onGetName() { return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { Proc proc = fProc; for (int i = 0; i < N; ++i) { diff --git a/bench/SortBench.cpp b/bench/SortBench.cpp index a0a5393298..c19ebae0c8 100644 --- a/bench/SortBench.cpp +++ b/bench/SortBench.cpp @@ -120,7 +120,7 @@ protected: return fName.c_str(); } - virtual void onDraw(SkCanvas* canvas) { + virtual void onDraw(SkCanvas*) { int n = SkBENCHLOOP(200); for (int i = 0; i < n; i++) { memcpy(fSorted, fUnsorted, fCount * sizeof(int)); diff --git a/bench/WriterBench.cpp b/bench/WriterBench.cpp index faf17b5a86..68c694e53c 100644 --- a/bench/WriterBench.cpp +++ b/bench/WriterBench.cpp @@ -21,7 +21,7 @@ protected: return "writer"; } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas*) SK_OVERRIDE { static const char gStr[] = "abcdefghimjklmnopqrstuvwxyz"; static const size_t gLen = strlen(gStr); SkWriter32 writer(256 * 4); |