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/SkBenchmark.h b/bench/SkBenchmark.h
index 343bde2..811a1db 100644
--- a/bench/SkBenchmark.h
+++ b/bench/SkBenchmark.h
@@ -13,16 +13,16 @@
#include "SkTRegistry.h"
#define DEF_BENCH(code) \
-static SkBenchmark* SK_MACRO_APPEND_LINE(F_)(void* p) { code; } \
+static SkBenchmark* SK_MACRO_APPEND_LINE(F_)() { code; } \
static BenchRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_));
/*
* With the above macros, you can register benches as follows (at the bottom
* of your .cpp)
*
- * DEF_BENCH(new MyBenchmark(p, ...))
- * DEF_BENCH(new MyBenchmark(p, ...))
- * DEF_BENCH(new MyBenchmark(p, ...))
+ * DEF_BENCH(return new MyBenchmark(...))
+ * DEF_BENCH(return new MyBenchmark(...))
+ * DEF_BENCH(return new MyBenchmark(...))
*/
@@ -43,7 +43,7 @@
public:
SK_DECLARE_INST_COUNT(SkBenchmark)
- SkBenchmark(void* defineDict);
+ SkBenchmark();
const char* getName();
SkIPoint getSize();
@@ -129,6 +129,6 @@
typedef SkRefCnt INHERITED;
};
-typedef SkTRegistry<SkBenchmark*(*)(void*)> BenchRegistry;
+typedef SkTRegistry<SkBenchmark*(*)()> BenchRegistry;
#endif