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
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index 84fe3ab..040dfd5 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -38,8 +38,8 @@
     bool                fDoClip;
 
 public:
-    DashBench(void* param, const SkScalar intervals[], int count, int width,
-              bool doClip = false) : INHERITED(param) {
+    DashBench(const SkScalar intervals[], int count, int width,
+              bool doClip = false)  {
         fIntervals.append(count, intervals);
         for (int i = 0; i < count; ++i) {
             fIntervals[i] *= width;
@@ -99,8 +99,8 @@
 
 class RectDashBench : public DashBench {
 public:
-    RectDashBench(void* param, const SkScalar intervals[], int count, int width)
-    : INHERITED(param, intervals, count, width) {
+    RectDashBench(const SkScalar intervals[], int count, int width)
+    : INHERITED(intervals, count, width) {
         fName.append("_rect");
     }
 
@@ -181,7 +181,7 @@
     SkAutoTUnref<SkPathEffect> fPE;
 
 public:
-    MakeDashBench(void* param, void (*proc)(SkPath*), const char name[]) : INHERITED(param) {
+    MakeDashBench(void (*proc)(SkPath*), const char name[])  {
         fName.printf("makedash_%s", name);
         proc(&fPath);
 
@@ -218,7 +218,7 @@
     SkAutoTUnref<SkPathEffect> fPE;
 
 public:
-    DashLineBench(void* param, SkScalar width, bool isRound) : INHERITED(param) {
+    DashLineBench(SkScalar width, bool isRound)  {
         fName.printf("dashline_%g_%s", SkScalarToFloat(width), isRound ? "circle" : "square");
         fStrokeWidth = width;
         fIsRound = isRound;
@@ -256,8 +256,8 @@
     SkAutoTUnref<SkPathEffect> fPathEffect;
 
 public:
-    DrawPointsDashingBench(void* param, int dashLength, int strokeWidth, bool doAA)
-        : INHERITED(param) {
+    DrawPointsDashingBench(int dashLength, int strokeWidth, bool doAA)
+         {
         fName.printf("drawpointsdash_%d_%d%s", dashLength, strokeWidth, doAA ? "_aa" : "_bw");
         fStrokeWidth = strokeWidth;
         fDoAA = doAA;
@@ -316,7 +316,7 @@
         return gNames[lt];
     }
 
-    GiantDashBench(void* param, LineType lt, SkScalar width) : INHERITED(param) {
+    GiantDashBench(LineType lt, SkScalar width)  {
         fName.printf("giantdashline_%s_%g", LineTypeName(lt), width);
         fStrokeWidth = width;
 
@@ -380,39 +380,39 @@
 
 #define PARAM(array)    array, SK_ARRAY_COUNT(array)
 
-DEF_BENCH( return new DashBench(p, PARAM(gDots), 0); )
-DEF_BENCH( return new DashBench(p, PARAM(gDots), 1); )
-DEF_BENCH( return new DashBench(p, PARAM(gDots), 1, true); )
-DEF_BENCH( return new DashBench(p, PARAM(gDots), 4); )
-DEF_BENCH( return new MakeDashBench(p, make_poly, "poly"); )
-DEF_BENCH( return new MakeDashBench(p, make_quad, "quad"); )
-DEF_BENCH( return new MakeDashBench(p, make_cubic, "cubic"); )
-DEF_BENCH( return new DashLineBench(p, 0, false); )
-DEF_BENCH( return new DashLineBench(p, SK_Scalar1, false); )
-DEF_BENCH( return new DashLineBench(p, 2 * SK_Scalar1, false); )
-DEF_BENCH( return new DashLineBench(p, 0, true); )
-DEF_BENCH( return new DashLineBench(p, SK_Scalar1, true); )
-DEF_BENCH( return new DashLineBench(p, 2 * SK_Scalar1, true); )
+DEF_BENCH( return new DashBench(PARAM(gDots), 0); )
+DEF_BENCH( return new DashBench(PARAM(gDots), 1); )
+DEF_BENCH( return new DashBench(PARAM(gDots), 1, true); )
+DEF_BENCH( return new DashBench(PARAM(gDots), 4); )
+DEF_BENCH( return new MakeDashBench(make_poly, "poly"); )
+DEF_BENCH( return new MakeDashBench(make_quad, "quad"); )
+DEF_BENCH( return new MakeDashBench(make_cubic, "cubic"); )
+DEF_BENCH( return new DashLineBench(0, false); )
+DEF_BENCH( return new DashLineBench(SK_Scalar1, false); )
+DEF_BENCH( return new DashLineBench(2 * SK_Scalar1, false); )
+DEF_BENCH( return new DashLineBench(0, true); )
+DEF_BENCH( return new DashLineBench(SK_Scalar1, true); )
+DEF_BENCH( return new DashLineBench(2 * SK_Scalar1, true); )
 
-DEF_BENCH( return new DrawPointsDashingBench(p, 1, 1, false); )
-DEF_BENCH( return new DrawPointsDashingBench(p, 1, 1, true); )
-DEF_BENCH( return new DrawPointsDashingBench(p, 3, 1, false); )
-DEF_BENCH( return new DrawPointsDashingBench(p, 3, 1, true); )
-DEF_BENCH( return new DrawPointsDashingBench(p, 5, 5, false); )
-DEF_BENCH( return new DrawPointsDashingBench(p, 5, 5, true); )
+DEF_BENCH( return new DrawPointsDashingBench(1, 1, false); )
+DEF_BENCH( return new DrawPointsDashingBench(1, 1, true); )
+DEF_BENCH( return new DrawPointsDashingBench(3, 1, false); )
+DEF_BENCH( return new DrawPointsDashingBench(3, 1, true); )
+DEF_BENCH( return new DrawPointsDashingBench(5, 5, false); )
+DEF_BENCH( return new DrawPointsDashingBench(5, 5, true); )
 
 /* Disable the GiantDashBench for Android devices until we can better control
  * the memory usage. (https://code.google.com/p/skia/issues/detail?id=1430)
  */
 #ifndef SK_BUILD_FOR_ANDROID
-DEF_BENCH( return new GiantDashBench(p, GiantDashBench::kHori_LineType, 0); )
-DEF_BENCH( return new GiantDashBench(p, GiantDashBench::kVert_LineType, 0); )
-DEF_BENCH( return new GiantDashBench(p, GiantDashBench::kDiag_LineType, 0); )
+DEF_BENCH( return new GiantDashBench(GiantDashBench::kHori_LineType, 0); )
+DEF_BENCH( return new GiantDashBench(GiantDashBench::kVert_LineType, 0); )
+DEF_BENCH( return new GiantDashBench(GiantDashBench::kDiag_LineType, 0); )
 
 // pass 2 to explicitly avoid any 1-is-the-same-as-hairline special casing
 
 // hori_2 is just too slow to enable at the moment
-DEF_BENCH( return new GiantDashBench(p, GiantDashBench::kHori_LineType, 2); )
-DEF_BENCH( return new GiantDashBench(p, GiantDashBench::kVert_LineType, 2); )
-DEF_BENCH( return new GiantDashBench(p, GiantDashBench::kDiag_LineType, 2); )
+DEF_BENCH( return new GiantDashBench(GiantDashBench::kHori_LineType, 2); )
+DEF_BENCH( return new GiantDashBench(GiantDashBench::kVert_LineType, 2); )
+DEF_BENCH( return new GiantDashBench(GiantDashBench::kDiag_LineType, 2); )
 #endif