Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: bench/BicubicBench.cpp

Issue 23876006: Refactoring: get rid of the SkBenchmark void* parameter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sync to head Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/AAClipBench.cpp ('k') | bench/BitmapBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BicubicBench.cpp
diff --git a/bench/BicubicBench.cpp b/bench/BicubicBench.cpp
index ece7cbe503f484a58f01bf48ce9823bea1725869..d0e48f653a00063a088ec86f1760d11ef0c0c523 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); )
« no previous file with comments | « bench/AAClipBench.cpp ('k') | bench/BitmapBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698