Refactoring: get rid of the SkBenchmark void* parameter.
While I was doing massive sed-ing, I also converted every bench to use DEF_BENCH instead of registering the ugly manual way.
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/23876006
git-svn-id: http://skia.googlecode.com/svn/trunk@11263 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp
index 2cc7688..0110dbc 100644
--- a/bench/RefCntBench.cpp
+++ b/bench/RefCntBench.cpp
@@ -16,7 +16,7 @@
class RefCntBench_Stack : public SkBenchmark {
public:
- RefCntBench_Stack(void* param) : INHERITED(param) {
+ RefCntBench_Stack() {
fIsRendering = false;
}
protected:
@@ -53,7 +53,7 @@
class RefCntBench_Heap : public SkBenchmark {
public:
- RefCntBench_Heap(void* param) : INHERITED(param) {
+ RefCntBench_Heap() {
fIsRendering = false;
}
protected:
@@ -79,7 +79,7 @@
class RefCntBench_New : public SkBenchmark {
public:
- RefCntBench_New(void* param) : INHERITED(param) {
+ RefCntBench_New() {
fIsRendering = false;
}
protected:
@@ -106,7 +106,7 @@
class WeakRefCntBench_Stack : public SkBenchmark {
public:
- WeakRefCntBench_Stack(void* param) : INHERITED(param) {
+ WeakRefCntBench_Stack() {
fIsRendering = false;
}
protected:
@@ -136,7 +136,7 @@
class WeakRefCntBench_Heap : public SkBenchmark {
public:
- WeakRefCntBench_Heap(void* param) : INHERITED(param) {
+ WeakRefCntBench_Heap() {
fIsRendering = false;
}
protected:
@@ -162,7 +162,7 @@
class WeakRefCntBench_New : public SkBenchmark {
public:
- WeakRefCntBench_New(void* param) : INHERITED(param) {
+ WeakRefCntBench_New() {
fIsRendering = false;
}
protected:
@@ -187,18 +187,10 @@
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact00(void* p) { return new RefCntBench_Stack(p); }
-static SkBenchmark* Fact01(void* p) { return new RefCntBench_Heap(p); }
-static SkBenchmark* Fact02(void* p) { return new RefCntBench_New(p); }
+DEF_BENCH( return new RefCntBench_Stack(); )
+DEF_BENCH( return new RefCntBench_Heap(); )
+DEF_BENCH( return new RefCntBench_New(); )
-static SkBenchmark* Fact10(void* p) { return new WeakRefCntBench_Stack(p); }
-static SkBenchmark* Fact11(void* p) { return new WeakRefCntBench_Heap(p); }
-static SkBenchmark* Fact12(void* p) { return new WeakRefCntBench_New(p); }
-
-static BenchRegistry gReg00(Fact00);
-static BenchRegistry gReg01(Fact01);
-static BenchRegistry gReg02(Fact02);
-
-static BenchRegistry gReg10(Fact10);
-static BenchRegistry gReg11(Fact11);
-static BenchRegistry gReg12(Fact12);
+DEF_BENCH( return new WeakRefCntBench_Stack(); )
+DEF_BENCH( return new WeakRefCntBench_Heap(); )
+DEF_BENCH( return new WeakRefCntBench_New(); )