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

Unified Diff: bench/ChartBench.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/BlurRectBench.cpp ('k') | bench/ChecksumBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ChartBench.cpp
diff --git a/bench/ChartBench.cpp b/bench/ChartBench.cpp
index 699004906520f9e2d6415e072b6b0feddf970c6b..e63021fc57ce3e76b7f7aae50d6fe808139f575a 100644
--- a/bench/ChartBench.cpp
+++ b/bench/ChartBench.cpp
@@ -91,7 +91,7 @@ void gen_paths(const SkTDArray<SkScalar>& topData,
// filling
class ChartBench : public SkBenchmark {
public:
- ChartBench(void* param, bool aa) : SkBenchmark(param) {
+ ChartBench(bool aa) {
fShift = 0;
fAA = aa;
fSize.fWidth = -1;
@@ -194,8 +194,5 @@ private:
//////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact0(void* p) { return new ChartBench(p, true); }
-static SkBenchmark* Fact1(void* p) { return new ChartBench(p, false); }
-
-static BenchRegistry gReg0(Fact0);
-static BenchRegistry gReg1(Fact1);
+DEF_BENCH( return new ChartBench(true); )
+DEF_BENCH( return new ChartBench(false); )
« no previous file with comments | « bench/BlurRectBench.cpp ('k') | bench/ChecksumBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698