diff options
author | 2013-09-13 19:52:27 +0000 | |
---|---|---|
committer | 2013-09-13 19:52:27 +0000 | |
commit | 410e6e80f00a6c660675c80904807a041c7b7d2a (patch) | |
tree | e6b7287001f032ae9a9e09de19db5d0867bea9e3 /bench/BicubicBench.cpp | |
parent | af54a513a5b7723b53f61730afe0ad6256881749 (diff) |
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
Diffstat (limited to 'bench/BicubicBench.cpp')
-rw-r--r-- | bench/BicubicBench.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/bench/BicubicBench.cpp b/bench/BicubicBench.cpp index ece7cbe503..d0e48f653a 100644 --- a/bench/BicubicBench.cpp +++ b/bench/BicubicBench.cpp @@ -19,10 +19,10 @@ class BicubicBench : public SkBenchmark { SkString fName; public: - BicubicBench(void* param, float x, float y) - : INHERITED(param), fScale(SkSize::Make(SkFloatToScalar(x), SkFloatToScalar(y))) { + BicubicBench(float x, float y) + : fScale(SkSize::Make(SkFloatToScalar(x), SkFloatToScalar(y))) { fName.printf("bicubic_%gx%g", - SkScalarToFloat(fScale.fWidth), SkScalarToFloat(fScale.fHeight)); + SkScalarToFloat(fScale.fWidth), SkScalarToFloat(fScale.fHeight)); } protected: @@ -52,12 +52,7 @@ private: typedef SkBenchmark INHERITED; }; -static SkBenchmark* Fact00(void* p) { return new BicubicBench(p, 10.0f, 10.0f); } -static SkBenchmark* Fact01(void* p) { return new BicubicBench(p, 2.5f, 10.0f); } -static SkBenchmark* Fact02(void* p) { return new BicubicBench(p, 10.0f, 2.5f); } -static SkBenchmark* Fact03(void* p) { return new BicubicBench(p, 2.5f, 2.5f); } - -static BenchRegistry gReg00(Fact00); -static BenchRegistry gReg01(Fact01); -static BenchRegistry gReg02(Fact02); -static BenchRegistry gReg03(Fact03); +DEF_BENCH( return new BicubicBench(10.0f, 10.0f); ) +DEF_BENCH( return new BicubicBench(2.5f, 10.0f); ) +DEF_BENCH( return new BicubicBench(10.0f, 2.5f); ) +DEF_BENCH( return new BicubicBench(2.5f, 2.5f); ) |