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/DecodeBench.cpp b/bench/DecodeBench.cpp
index c45654c..4397eef 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -21,7 +21,7 @@
SkBitmap::Config fPrefConfig;
SkString fName;
public:
- DecodeBench(void* param, SkBitmap::Config c) : SkBenchmark(param) {
+ DecodeBench(SkBitmap::Config c) {
fPrefConfig = c;
const char* fname = strrchr(FLAGS_decodeBenchFilename[0], '/');
@@ -51,10 +51,6 @@
typedef SkBenchmark INHERITED;
};
-static SkBenchmark* Fact0(void* p) { return new DecodeBench(p, SkBitmap::kARGB_8888_Config); }
-static SkBenchmark* Fact1(void* p) { return new DecodeBench(p, SkBitmap::kRGB_565_Config); }
-static SkBenchmark* Fact2(void* p) { return new DecodeBench(p, SkBitmap::kARGB_4444_Config); }
-
-static BenchRegistry gReg0(Fact0);
-static BenchRegistry gReg1(Fact1);
-static BenchRegistry gReg2(Fact2);
+DEF_BENCH( return new DecodeBench(SkBitmap::kARGB_8888_Config); )
+DEF_BENCH( return new DecodeBench(SkBitmap::kRGB_565_Config); )
+DEF_BENCH( return new DecodeBench(SkBitmap::kARGB_4444_Config); )