diff options
author | 2013-02-04 18:00:54 +0000 | |
---|---|---|
committer | 2013-02-04 18:00:54 +0000 | |
commit | 58ba41034eed12ddd5d1c0b8fe158078746dd629 (patch) | |
tree | 5e9f83a682a4f219f1638a346b6e69344ffe9a80 | |
parent | 7fbf5cfae80e1526147274a175a2f6a2688fb466 (diff) |
cleanup: use DEF_BENCH macro
git-svn-id: http://skia.googlecode.com/svn/trunk@7547 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | bench/GradientBench.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp index 2f1b825c67..93637e4f88 100644 --- a/bench/GradientBench.cpp +++ b/bench/GradientBench.cpp @@ -257,33 +257,21 @@ private: typedef SkBenchmark INHERITED; }; -static SkBenchmark* Fact0(void* p) { return new GradientBench(p, kLinear_GradType); } -static SkBenchmark* Fact01(void* p) { return new GradientBench(p, kLinear_GradType, SkShader::kMirror_TileMode); } +DEF_BENCH( return new GradientBench(p, kLinear_GradType); ) +DEF_BENCH( return new GradientBench(p, kLinear_GradType, SkShader::kMirror_TileMode); ) // Draw a radial gradient of radius 1/2 on a rectangle; half the lines should // be completely pinned, the other half should pe partially pinned -static SkBenchmark* Fact1(void* p) { return new GradientBench(p, kRadial_GradType, SkShader::kClamp_TileMode, kRect_GeomType, 0.5f); } +DEF_BENCH( return new GradientBench(p, kRadial_GradType, SkShader::kClamp_TileMode, kRect_GeomType, 0.5f); ) // Draw a radial gradient on a circle of equal size; all the lines should // hit the unpinned fast path (so long as GradientBench.W == H) -static SkBenchmark* Fact1o(void* p) { return new GradientBench(p, kRadial_GradType, SkShader::kClamp_TileMode, kOval_GeomType); } - -static SkBenchmark* Fact11(void* p) { return new GradientBench(p, kRadial_GradType, SkShader::kMirror_TileMode); } -static SkBenchmark* Fact2(void* p) { return new GradientBench(p, kSweep_GradType); } -static SkBenchmark* Fact3(void* p) { return new GradientBench(p, kRadial2_GradType); } -static SkBenchmark* Fact31(void* p) { return new GradientBench(p, kRadial2_GradType, SkShader::kMirror_TileMode); } -static SkBenchmark* Fact5(void* p) { return new GradientBench(p, kConical_GradType); } - -static SkBenchmark* Fact4(void* p) { return new Gradient2Bench(p); } - -static BenchRegistry gReg0(Fact0); -static BenchRegistry gReg01(Fact01); -static BenchRegistry gReg1(Fact1); -static BenchRegistry gReg1o(Fact1o); -static BenchRegistry gReg11(Fact11); -static BenchRegistry gReg2(Fact2); -static BenchRegistry gReg3(Fact3); -static BenchRegistry gReg31(Fact31); -static BenchRegistry gReg5(Fact5); - -static BenchRegistry gReg4(Fact4); +DEF_BENCH( return new GradientBench(p, kRadial_GradType, SkShader::kClamp_TileMode, kOval_GeomType); ) + +DEF_BENCH( return new GradientBench(p, kRadial_GradType, SkShader::kMirror_TileMode); ) +DEF_BENCH( return new GradientBench(p, kSweep_GradType); ) +DEF_BENCH( return new GradientBench(p, kRadial2_GradType); ) +DEF_BENCH( return new GradientBench(p, kRadial2_GradType, SkShader::kMirror_TileMode); ) +DEF_BENCH( return new GradientBench(p, kConical_GradType); ) + +DEF_BENCH( return new Gradient2Bench(p); ) |