Add warmup bench to visual bench
BUG=skia:
Review URL: https://codereview.chromium.org/1358373003
diff --git a/tools/VisualBench/VisualLightweightBenchModule.h b/tools/VisualBench/VisualLightweightBenchModule.h
index 5d48692..0eb024b 100644
--- a/tools/VisualBench/VisualLightweightBenchModule.h
+++ b/tools/VisualBench/VisualLightweightBenchModule.h
@@ -34,6 +34,7 @@
private:
/*
* The heart of visual bench is an event driven timing loop.
+ * kWarmup_State: We run a dummy bench to let things settle on startup
* kPreWarmLoopsPerCanvasPreDraw_State: Before we begin timing, Benchmarks have a hook to
* access the canvas. Then we prewarm before the autotune
* loops step.
@@ -53,6 +54,7 @@
* In either case we reset the context.
*/
enum State {
+ kWarmup_State,
kPreWarmLoopsPerCanvasPreDraw_State,
kPreWarmLoops_State,
kTuneLoops_State,
@@ -76,6 +78,7 @@
void resetTimingState();
void postDraw(SkCanvas*);
void recordMeasurement();
+ void warmup(SkCanvas* canvas);
struct Record {
SkTArray<double> fMeasurements;