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

Unified Diff: bench/InterpBench.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/ImageDecodeBench.cpp ('k') | bench/LightingBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/InterpBench.cpp
diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp
index 513618b8f1d84ab8bfd2c1b0ee65c4a9c09bde9b..f43c37e77d51d390955bccb1e3bb18e7abf74da3 100644
--- a/bench/InterpBench.cpp
+++ b/bench/InterpBench.cpp
@@ -16,7 +16,7 @@ class InterpBench : public SkBenchmark {
int16_t fDst[kBuffer];
float fFx, fDx;
public:
- InterpBench(void* param, const char name[]) : INHERITED(param) {
+ InterpBench(const char name[]) {
fName.printf("interp_%s", name);
fFx = 3.3f;
fDx = 0.1257f;
@@ -45,7 +45,7 @@ private:
class Fixed16D16Interp : public InterpBench {
public:
- Fixed16D16Interp(void* param) : INHERITED(param, "16.16") {}
+ Fixed16D16Interp() : INHERITED("16.16") {}
protected:
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
@@ -64,7 +64,7 @@ private:
class Fixed32D32Interp : public InterpBench {
public:
- Fixed32D32Interp(void* param) : INHERITED(param, "32.32") {}
+ Fixed32D32Interp() : INHERITED("32.32") {}
protected:
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
@@ -95,7 +95,7 @@ private:
class Fixed16D48Interp : public InterpBench {
public:
- Fixed16D48Interp(void* param) : INHERITED(param, "16.48") {}
+ Fixed16D48Interp() : INHERITED("16.48") {}
protected:
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
@@ -115,7 +115,7 @@ private:
class FloatInterp : public InterpBench {
public:
- FloatInterp(void* param) : INHERITED(param, "float") {}
+ FloatInterp() : INHERITED("float") {}
protected:
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
@@ -133,7 +133,7 @@ private:
class DoubleInterp : public InterpBench {
public:
- DoubleInterp(void* param) : INHERITED(param, "double") {}
+ DoubleInterp() : INHERITED("double") {}
protected:
virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
@@ -153,14 +153,8 @@ private:
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* M0(void* p) { return new Fixed16D16Interp(p); }
-static SkBenchmark* M1(void* p) { return new Fixed32D32Interp(p); }
-static SkBenchmark* M2(void* p) { return new Fixed16D48Interp(p); }
-static SkBenchmark* M3(void* p) { return new FloatInterp(p); }
-static SkBenchmark* M4(void* p) { return new DoubleInterp(p); }
-
-static BenchRegistry gReg0(M0);
-static BenchRegistry gReg1(M1);
-static BenchRegistry gReg2(M2);
-static BenchRegistry gReg3(M3);
-static BenchRegistry gReg4(M4);
+DEF_BENCH( return new Fixed16D16Interp(); )
+DEF_BENCH( return new Fixed32D32Interp(); )
+DEF_BENCH( return new Fixed16D48Interp(); )
+DEF_BENCH( return new FloatInterp(); )
+DEF_BENCH( return new DoubleInterp(); )
« no previous file with comments | « bench/ImageDecodeBench.cpp ('k') | bench/LightingBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698