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

Unified Diff: bench/DecodeBench.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/DashBench.cpp ('k') | bench/DeferredCanvasBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DecodeBench.cpp
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp
index c45654cccb72f3619edb833e8b0a5c9f5ac15322..4397eef65df071c9499c96454953313e6a7d4fa7 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -21,7 +21,7 @@ class DecodeBench : public SkBenchmark {
SkBitmap::Config fPrefConfig;
SkString fName;
public:
- DecodeBench(void* param, SkBitmap::Config c) : SkBenchmark(param) {
+ DecodeBench(SkBitmap::Config c) {
fPrefConfig = c;
const char* fname = strrchr(FLAGS_decodeBenchFilename[0], '/');
@@ -51,10 +51,6 @@ private:
typedef SkBenchmark INHERITED;
};
-static SkBenchmark* Fact0(void* p) { return new DecodeBench(p, SkBitmap::kARGB_8888_Config); }
-static SkBenchmark* Fact1(void* p) { return new DecodeBench(p, SkBitmap::kRGB_565_Config); }
-static SkBenchmark* Fact2(void* p) { return new DecodeBench(p, SkBitmap::kARGB_4444_Config); }
-
-static BenchRegistry gReg0(Fact0);
-static BenchRegistry gReg1(Fact1);
-static BenchRegistry gReg2(Fact2);
+DEF_BENCH( return new DecodeBench(SkBitmap::kARGB_8888_Config); )
+DEF_BENCH( return new DecodeBench(SkBitmap::kRGB_565_Config); )
+DEF_BENCH( return new DecodeBench(SkBitmap::kARGB_4444_Config); )
« no previous file with comments | « bench/DashBench.cpp ('k') | bench/DeferredCanvasBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698