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

Unified Diff: bench/GrMemoryPoolBench.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/GameBench.cpp ('k') | bench/GradientBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GrMemoryPoolBench.cpp
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp
index 5ad1afa51c81290b4a5127aa16164e35b7b1be36..4fae5913c15a497d5acc66d0421e609c5b4a3501 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
« no previous file with comments | « bench/GameBench.cpp ('k') | bench/GradientBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698