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

Unified Diff: bench/RefCntBench.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/RectoriBench.cpp ('k') | bench/RegionBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RefCntBench.cpp
diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp
index 2cc768850e748766761d116cd0890e5cabe7154c..0110dbcb1317ebd317f82f9b0cfb03ffbbd8e062 100644
--- a/bench/RefCntBench.cpp
+++ b/bench/RefCntBench.cpp
@@ -16,7 +16,7 @@ enum {
class RefCntBench_Stack : public SkBenchmark {
public:
- RefCntBench_Stack(void* param) : INHERITED(param) {
+ RefCntBench_Stack() {
fIsRendering = false;
}
protected:
@@ -53,7 +53,7 @@ SK_DEFINE_INST_COUNT(PlacedRefCnt)
class RefCntBench_Heap : public SkBenchmark {
public:
- RefCntBench_Heap(void* param) : INHERITED(param) {
+ RefCntBench_Heap() {
fIsRendering = false;
}
protected:
@@ -79,7 +79,7 @@ private:
class RefCntBench_New : public SkBenchmark {
public:
- RefCntBench_New(void* param) : INHERITED(param) {
+ RefCntBench_New() {
fIsRendering = false;
}
protected:
@@ -106,7 +106,7 @@ private:
class WeakRefCntBench_Stack : public SkBenchmark {
public:
- WeakRefCntBench_Stack(void* param) : INHERITED(param) {
+ WeakRefCntBench_Stack() {
fIsRendering = false;
}
protected:
@@ -136,7 +136,7 @@ public:
class WeakRefCntBench_Heap : public SkBenchmark {
public:
- WeakRefCntBench_Heap(void* param) : INHERITED(param) {
+ WeakRefCntBench_Heap() {
fIsRendering = false;
}
protected:
@@ -162,7 +162,7 @@ private:
class WeakRefCntBench_New : public SkBenchmark {
public:
- WeakRefCntBench_New(void* param) : INHERITED(param) {
+ WeakRefCntBench_New() {
fIsRendering = false;
}
protected:
@@ -187,18 +187,10 @@ private:
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact00(void* p) { return new RefCntBench_Stack(p); }
-static SkBenchmark* Fact01(void* p) { return new RefCntBench_Heap(p); }
-static SkBenchmark* Fact02(void* p) { return new RefCntBench_New(p); }
+DEF_BENCH( return new RefCntBench_Stack(); )
+DEF_BENCH( return new RefCntBench_Heap(); )
+DEF_BENCH( return new RefCntBench_New(); )
-static SkBenchmark* Fact10(void* p) { return new WeakRefCntBench_Stack(p); }
-static SkBenchmark* Fact11(void* p) { return new WeakRefCntBench_Heap(p); }
-static SkBenchmark* Fact12(void* p) { return new WeakRefCntBench_New(p); }
-
-static BenchRegistry gReg00(Fact00);
-static BenchRegistry gReg01(Fact01);
-static BenchRegistry gReg02(Fact02);
-
-static BenchRegistry gReg10(Fact10);
-static BenchRegistry gReg11(Fact11);
-static BenchRegistry gReg12(Fact12);
+DEF_BENCH( return new WeakRefCntBench_Stack(); )
+DEF_BENCH( return new WeakRefCntBench_Heap(); )
+DEF_BENCH( return new WeakRefCntBench_New(); )
« no previous file with comments | « bench/RectoriBench.cpp ('k') | bench/RegionBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698