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

Unified Diff: bench/Benchmark.h

Issue 1386933002: Cleanup timing state machine (Closed) Base URL: https://skia.googlesource.com/skia.git@vb2
Patch Set: rebase Created 5 years, 2 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 | « no previous file | tools/VisualBench/TimingStateMachine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | tools/VisualBench/TimingStateMachine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698