From 410e6e80f00a6c660675c80904807a041c7b7d2a Mon Sep 17 00:00:00 2001 From: "mtklein@google.com" Date: Fri, 13 Sep 2013 19:52:27 +0000 Subject: Refactoring: get rid of the SkBenchmark void* parameter. While I was doing massive sed-ing, I also converted every bench to use DEF_BENCH instead of registering the ugly manual way. BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/23876006 git-svn-id: http://skia.googlecode.com/svn/trunk@11263 2bbb7eff-a529-9590-31e7-b0007b416f81 --- bench/HairlinePathBench.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'bench/HairlinePathBench.cpp') diff --git a/bench/HairlinePathBench.cpp b/bench/HairlinePathBench.cpp index 3ba09722fb..c59647572a 100644 --- a/bench/HairlinePathBench.cpp +++ b/bench/HairlinePathBench.cpp @@ -32,7 +32,7 @@ static const int kMaxPathSize = 10; class HairlinePathBench : public SkBenchmark { public: - HairlinePathBench(void* param, Flags flags) : INHERITED(param), fFlags(flags) { + HairlinePathBench(Flags flags) : fFlags(flags) { fPaint.setStyle(SkPaint::kStroke_Style); fPaint.setStrokeWidth(SkIntToScalar(0)); } @@ -77,7 +77,7 @@ private: class LinePathBench : public HairlinePathBench { public: - LinePathBench(void* param, Flags flags) : INHERITED(param, flags) {} + LinePathBench(Flags flags) : INHERITED(flags) {} virtual void appendName(SkString* name) SK_OVERRIDE { name->append("line"); @@ -109,7 +109,7 @@ private: class QuadPathBench : public HairlinePathBench { public: - QuadPathBench(void* param, Flags flags) : INHERITED(param, flags) {} + QuadPathBench(Flags flags) : INHERITED(flags) {} virtual void appendName(SkString* name) SK_OVERRIDE { name->append("quad"); @@ -141,7 +141,7 @@ private: class ConicPathBench : public HairlinePathBench { public: - ConicPathBench(void* param, Flags flags) : INHERITED(param, flags) {} + ConicPathBench(Flags flags) : INHERITED(flags) {} virtual void appendName(SkString* name) SK_OVERRIDE { name->append("conic"); @@ -176,7 +176,7 @@ private: class CubicPathBench : public HairlinePathBench { public: - CubicPathBench(void* param, Flags flags) : INHERITED(param, flags) {} + CubicPathBench(Flags flags) : INHERITED(flags) {} virtual void appendName(SkString* name) SK_OVERRIDE { name->append("cubic"); @@ -214,23 +214,23 @@ private: // FLAG10 - AA, big // FLAG11 - AA, big -DEF_BENCH( return new LinePathBench(p, FLAGS00); ) -DEF_BENCH( return new LinePathBench(p, FLAGS01); ) -DEF_BENCH( return new LinePathBench(p, FLAGS10); ) -DEF_BENCH( return new LinePathBench(p, FLAGS11); ) +DEF_BENCH( return new LinePathBench(FLAGS00); ) +DEF_BENCH( return new LinePathBench(FLAGS01); ) +DEF_BENCH( return new LinePathBench(FLAGS10); ) +DEF_BENCH( return new LinePathBench(FLAGS11); ) -DEF_BENCH( return new QuadPathBench(p, FLAGS00); ) -DEF_BENCH( return new QuadPathBench(p, FLAGS01); ) -DEF_BENCH( return new QuadPathBench(p, FLAGS10); ) -DEF_BENCH( return new QuadPathBench(p, FLAGS11); ) +DEF_BENCH( return new QuadPathBench(FLAGS00); ) +DEF_BENCH( return new QuadPathBench(FLAGS01); ) +DEF_BENCH( return new QuadPathBench(FLAGS10); ) +DEF_BENCH( return new QuadPathBench(FLAGS11); ) // Don't have default path renderer for conics yet on GPU, so must use AA -// DEF_BENCH( return new ConicPathBench(p, FLAGS00); ) -// DEF_BENCH( return new ConicPathBench(p, FLAGS01); ) -DEF_BENCH( return new ConicPathBench(p, FLAGS10); ) -DEF_BENCH( return new ConicPathBench(p, FLAGS11); ) - -DEF_BENCH( return new CubicPathBench(p, FLAGS00); ) -DEF_BENCH( return new CubicPathBench(p, FLAGS01); ) -DEF_BENCH( return new CubicPathBench(p, FLAGS10); ) -DEF_BENCH( return new CubicPathBench(p, FLAGS11); ) +// DEF_BENCH( return new ConicPathBench(FLAGS00); ) +// DEF_BENCH( return new ConicPathBench(FLAGS01); ) +DEF_BENCH( return new ConicPathBench(FLAGS10); ) +DEF_BENCH( return new ConicPathBench(FLAGS11); ) + +DEF_BENCH( return new CubicPathBench(FLAGS00); ) +DEF_BENCH( return new CubicPathBench(FLAGS01); ) +DEF_BENCH( return new CubicPathBench(FLAGS10); ) +DEF_BENCH( return new CubicPathBench(FLAGS11); ) -- cgit v1.2.3