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

Unified Diff: bench/ShaderMaskBench.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/ScalarBench.cpp ('k') | bench/SkBenchmark.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ShaderMaskBench.cpp
diff --git a/bench/ShaderMaskBench.cpp b/bench/ShaderMaskBench.cpp
index 2738cff68be8f2c65b97debb882e8c7ea97d4a3d..71ca047018338016f70b8edfea0e5f08d587f212 100644
--- a/bench/ShaderMaskBench.cpp
+++ b/bench/ShaderMaskBench.cpp
@@ -38,7 +38,7 @@ class ShaderMaskBench : public SkBenchmark {
SkString fName;
FontQuality fFQ;
public:
- ShaderMaskBench(void* param, bool isOpaque, FontQuality fq) : INHERITED(param) {
+ ShaderMaskBench(bool isOpaque, FontQuality fq) {
fFQ = fq;
fText.set(STR);
@@ -91,16 +91,9 @@ private:
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact00(void* p) { return new ShaderMaskBench(p, true, kBW); }
-static SkBenchmark* Fact01(void* p) { return new ShaderMaskBench(p, false, kBW); }
-static SkBenchmark* Fact10(void* p) { return new ShaderMaskBench(p, true, kAA); }
-static SkBenchmark* Fact11(void* p) { return new ShaderMaskBench(p, false, kAA); }
-static SkBenchmark* Fact20(void* p) { return new ShaderMaskBench(p, true, kLCD); }
-static SkBenchmark* Fact21(void* p) { return new ShaderMaskBench(p, false, kLCD); }
-
-static BenchRegistry gReg00(Fact00);
-static BenchRegistry gReg01(Fact01);
-static BenchRegistry gReg10(Fact10);
-static BenchRegistry gReg11(Fact11);
-static BenchRegistry gReg20(Fact20);
-static BenchRegistry gReg21(Fact21);
+DEF_BENCH( return new ShaderMaskBench(true, kBW); )
+DEF_BENCH( return new ShaderMaskBench(false, kBW); )
+DEF_BENCH( return new ShaderMaskBench(true, kAA); )
+DEF_BENCH( return new ShaderMaskBench(false, kAA); )
+DEF_BENCH( return new ShaderMaskBench(true, kLCD); )
+DEF_BENCH( return new ShaderMaskBench(false, kLCD); )
« no previous file with comments | « bench/ScalarBench.cpp ('k') | bench/SkBenchmark.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698