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

Unified Diff: bench/SkBenchmark.h

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/ShaderMaskBench.cpp ('k') | bench/SkBenchmark.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkBenchmark.h
diff --git a/bench/SkBenchmark.h b/bench/SkBenchmark.h
index 343bde2139f3b3b87e628d66399f2164de8bab95..811a1db2c8366316dcf8f4872fbb6922faa72303 100644
--- a/bench/SkBenchmark.h
+++ b/bench/SkBenchmark.h
@@ -13,16 +13,16 @@
#include "SkTRegistry.h"
#define DEF_BENCH(code) \
-static SkBenchmark* SK_MACRO_APPEND_LINE(F_)(void* p) { code; } \
+static SkBenchmark* SK_MACRO_APPEND_LINE(F_)() { code; } \
static BenchRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_));
/*
* With the above macros, you can register benches as follows (at the bottom
* of your .cpp)
*
- * DEF_BENCH(new MyBenchmark(p, ...))
- * DEF_BENCH(new MyBenchmark(p, ...))
- * DEF_BENCH(new MyBenchmark(p, ...))
+ * DEF_BENCH(return new MyBenchmark(...))
+ * DEF_BENCH(return new MyBenchmark(...))
+ * DEF_BENCH(return new MyBenchmark(...))
*/
@@ -43,7 +43,7 @@ class SkBenchmark : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(SkBenchmark)
- SkBenchmark(void* defineDict);
+ SkBenchmark();
const char* getName();
SkIPoint getSize();
@@ -129,6 +129,6 @@ private:
typedef SkRefCnt INHERITED;
};
-typedef SkTRegistry<SkBenchmark*(*)(void*)> BenchRegistry;
+typedef SkTRegistry<SkBenchmark*(*)()> BenchRegistry;
#endif
« no previous file with comments | « bench/ShaderMaskBench.cpp ('k') | bench/SkBenchmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698