Index: bench/Benchmark.h |
diff --git a/bench/Benchmark.h b/bench/Benchmark.h |
index 00b05afa22ab7689664c0f22ebd265d94cdc3a99..a403a6e318fe0606a3db79351b27cf8a47918e2f 100644 |
--- a/bench/Benchmark.h |
+++ b/bench/Benchmark.h |
@@ -111,6 +111,19 @@ public: |
*/ |
virtual bool isVisual() { return false; } |
+ /* |
+ * VisualBench frequently resets the canvas. As a result we need to bulk call all of the hooks |
+ */ |
+ void preTimingHooks(SkCanvas* canvas) { |
+ this->perCanvasPreDraw(canvas); |
+ this->preDraw(canvas); |
+ } |
+ |
+ void postTimingHooks(SkCanvas* canvas) { |
+ this->postDraw(canvas); |
+ this->perCanvasPostDraw(canvas); |
+ } |
+ |
protected: |
virtual void setupPaint(SkPaint* paint); |