aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/GrMemoryPoolBench.cpp
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-13 19:52:27 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-13 19:52:27 +0000
commit410e6e80f00a6c660675c80904807a041c7b7d2a (patch)
treee6b7287001f032ae9a9e09de19db5d0867bea9e3 /bench/GrMemoryPoolBench.cpp
parentaf54a513a5b7723b53f61730afe0ad6256881749 (diff)
Refactoring: get rid of the SkBenchmark void* parameter.
While I was doing massive sed-ing, I also converted every bench to use DEF_BENCH instead of registering the ugly manual way. BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/23876006 git-svn-id: http://skia.googlecode.com/svn/trunk@11263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/GrMemoryPoolBench.cpp')
-rw-r--r--bench/GrMemoryPoolBench.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp
index 5ad1afa51c..4fae5913c1 100644
--- a/bench/GrMemoryPoolBench.cpp
+++ b/bench/GrMemoryPoolBench.cpp
@@ -35,7 +35,7 @@ GrMemoryPool A::gPool(10 * (1 << 10), 10 * (1 << 10));
*/
class GrMemoryPoolBenchStack : public SkBenchmark {
public:
- GrMemoryPoolBenchStack(void* param) : INHERITED(param) {
+ GrMemoryPoolBenchStack() {
fIsRendering = false;
}
protected:
@@ -86,7 +86,7 @@ private:
*/
class GrMemoryPoolBenchRandom : public SkBenchmark {
public:
- GrMemoryPoolBenchRandom(void* param) : INHERITED(param) {
+ GrMemoryPoolBenchRandom() {
fIsRendering = false;
}
protected:
@@ -123,7 +123,7 @@ class GrMemoryPoolBenchQueue : public SkBenchmark {
M = 4 * (1 << 10),
};
public:
- GrMemoryPoolBenchQueue(void* param) : INHERITED(param) {
+ GrMemoryPoolBenchQueue() {
fIsRendering = false;
}
protected:
@@ -151,12 +151,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact1(void* p) { return new GrMemoryPoolBenchStack(p); }
-static SkBenchmark* Fact2(void* p) { return new GrMemoryPoolBenchRandom(p); }
-static SkBenchmark* Fact3(void* p) { return new GrMemoryPoolBenchQueue(p); }
-
-static BenchRegistry gReg01(Fact1);
-static BenchRegistry gReg02(Fact2);
-static BenchRegistry gReg03(Fact3);
-
+DEF_BENCH( return new GrMemoryPoolBenchStack(); )
+DEF_BENCH( return new GrMemoryPoolBenchRandom(); )
+DEF_BENCH( return new GrMemoryPoolBenchQueue(); )
#endif