aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/ChecksumBench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/ChecksumBench.cpp')
-rw-r--r--bench/ChecksumBench.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp
index 7cc6008583..3e7a739e6c 100644
--- a/bench/ChecksumBench.cpp
+++ b/bench/ChecksumBench.cpp
@@ -28,7 +28,7 @@ class ComputeChecksumBench : public SkBenchmark {
ChecksumType fType;
public:
- ComputeChecksumBench(void* param, ChecksumType type) : INHERITED(param), fType(type) {
+ ComputeChecksumBench(ChecksumType type) : fType(type) {
SkRandom rand;
for (int i = 0; i < U32COUNT; ++i) {
fData[i] = rand.nextU();
@@ -88,13 +88,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact0(void* p) { return new ComputeChecksumBench(p, kChecksum_ChecksumType); }
-static SkBenchmark* Fact1(void* p) { return new ComputeChecksumBench(p, kMD5_ChecksumType); }
-static SkBenchmark* Fact2(void* p) { return new ComputeChecksumBench(p, kSHA1_ChecksumType); }
-static SkBenchmark* Fact3(void* p) { return new ComputeChecksumBench(p, kMurmur3_ChecksumType); }
-
-
-static BenchRegistry gReg0(Fact0);
-static BenchRegistry gReg1(Fact1);
-static BenchRegistry gReg2(Fact2);
-static BenchRegistry gReg3(Fact3);
+DEF_BENCH( return new ComputeChecksumBench(kChecksum_ChecksumType); )
+DEF_BENCH( return new ComputeChecksumBench(kMD5_ChecksumType); )
+DEF_BENCH( return new ComputeChecksumBench(kSHA1_ChecksumType); )
+DEF_BENCH( return new ComputeChecksumBench(kMurmur3_ChecksumType); )