Adds a bunch of benchmarks around creating, transforming, testing path equality,
and concatting paths. Also allows benchs to do setup / tear down steps outside
of the cons/destructor via new SkBenchmark virtuals.

Review URL: http://codereview.appspot.com/6454137/



git-svn-id: http://skia.googlecode.com/svn/trunk@5054 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/SkBenchmark.h b/bench/SkBenchmark.h
index 1d6fb41..28314ea 100644
--- a/bench/SkBenchmark.h
+++ b/bench/SkBenchmark.h
@@ -39,8 +39,19 @@
 
     const char* getName();
     SkIPoint getSize();
+
+    // Call before draw, allows the benchmark to do setup work outside of the
+    // timer. When a benchmark is repeatedly drawn, this should be called once
+    // before the initial draw.
+    void preDraw();
+
     void draw(SkCanvas*);
-    
+
+    // Call after draw, allows the benchmark to do cleanup work outside of the
+    // timer. When a benchmark is repeatedly drawn, this is only called once
+    // after the last draw.
+    void postDraw();
+
     void setForceAlpha(int alpha) {
         fForceAlpha = alpha;
     }
@@ -78,7 +89,9 @@
     void setupPaint(SkPaint* paint);
 
     virtual const char* onGetName() = 0;
+    virtual void onPreDraw() {}
     virtual void onDraw(SkCanvas*) = 0;
+    virtual void onPostDraw() {}
 
     virtual SkIPoint onGetSize();