Index: bench/InterpBench.cpp |
diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp |
index 513618b8f1d84ab8bfd2c1b0ee65c4a9c09bde9b..f43c37e77d51d390955bccb1e3bb18e7abf74da3 100644 |
--- a/bench/InterpBench.cpp |
+++ b/bench/InterpBench.cpp |
@@ -16,7 +16,7 @@ class InterpBench : public SkBenchmark { |
int16_t fDst[kBuffer]; |
float fFx, fDx; |
public: |
- InterpBench(void* param, const char name[]) : INHERITED(param) { |
+ InterpBench(const char name[]) { |
fName.printf("interp_%s", name); |
fFx = 3.3f; |
fDx = 0.1257f; |
@@ -45,7 +45,7 @@ private: |
class Fixed16D16Interp : public InterpBench { |
public: |
- Fixed16D16Interp(void* param) : INHERITED(param, "16.16") {} |
+ Fixed16D16Interp() : INHERITED("16.16") {} |
protected: |
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { |
@@ -64,7 +64,7 @@ private: |
class Fixed32D32Interp : public InterpBench { |
public: |
- Fixed32D32Interp(void* param) : INHERITED(param, "32.32") {} |
+ Fixed32D32Interp() : INHERITED("32.32") {} |
protected: |
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { |
@@ -95,7 +95,7 @@ private: |
class Fixed16D48Interp : public InterpBench { |
public: |
- Fixed16D48Interp(void* param) : INHERITED(param, "16.48") {} |
+ Fixed16D48Interp() : INHERITED("16.48") {} |
protected: |
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { |
@@ -115,7 +115,7 @@ private: |
class FloatInterp : public InterpBench { |
public: |
- FloatInterp(void* param) : INHERITED(param, "float") {} |
+ FloatInterp() : INHERITED("float") {} |
protected: |
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { |
@@ -133,7 +133,7 @@ private: |
class DoubleInterp : public InterpBench { |
public: |
- DoubleInterp(void* param) : INHERITED(param, "double") {} |
+ DoubleInterp() : INHERITED("double") {} |
protected: |
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { |
@@ -153,14 +153,8 @@ private: |
/////////////////////////////////////////////////////////////////////////////// |
-static SkBenchmark* M0(void* p) { return new Fixed16D16Interp(p); } |
-static SkBenchmark* M1(void* p) { return new Fixed32D32Interp(p); } |
-static SkBenchmark* M2(void* p) { return new Fixed16D48Interp(p); } |
-static SkBenchmark* M3(void* p) { return new FloatInterp(p); } |
-static SkBenchmark* M4(void* p) { return new DoubleInterp(p); } |
- |
-static BenchRegistry gReg0(M0); |
-static BenchRegistry gReg1(M1); |
-static BenchRegistry gReg2(M2); |
-static BenchRegistry gReg3(M3); |
-static BenchRegistry gReg4(M4); |
+DEF_BENCH( return new Fixed16D16Interp(); ) |
+DEF_BENCH( return new Fixed32D32Interp(); ) |
+DEF_BENCH( return new Fixed16D48Interp(); ) |
+DEF_BENCH( return new FloatInterp(); ) |
+DEF_BENCH( return new DoubleInterp(); ) |