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

Unified Diff: bench/MemoryBench.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/MatrixConvolutionBench.cpp ('k') | bench/MemsetBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MemoryBench.cpp
diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp
index ae14dac6a43a49c0c57eaf50382016a111b39f16..6e8e4a8588af45e8c1191794eb74ae24a6281af5 100644
--- a/bench/MemoryBench.cpp
+++ b/bench/MemoryBench.cpp
@@ -16,7 +16,7 @@ class ChunkAllocBench : public SkBenchmark {
SkString fName;
size_t fMinSize;
public:
- ChunkAllocBench(void* param, size_t minSize) : INHERITED(param) {
+ ChunkAllocBench(size_t minSize) {
fMinSize = minSize;
fName.printf("chunkalloc_" SK_SIZE_T_SPECIFIER, minSize);
fIsRendering = false;
@@ -50,8 +50,5 @@ private:
typedef SkBenchmark INHERITED;
};
-static SkBenchmark* F0(void* p) { return new ChunkAllocBench(p, 64); }
-static SkBenchmark* F1(void* p) { return new ChunkAllocBench(p, 8*1024); }
-
-static BenchRegistry gR0(F0);
-static BenchRegistry gR1(F1);
+DEF_BENCH( return new ChunkAllocBench(64); )
+DEF_BENCH( return new ChunkAllocBench(8*1024); )
« no previous file with comments | « bench/MatrixConvolutionBench.cpp ('k') | bench/MemsetBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698