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

Unified Diff: tools/VisualBench/VisualLightweightBenchModule.h

Issue 1358373003: Add warmup bench to visual bench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 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 | « bench/RectBench.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualLightweightBenchModule.h
diff --git a/tools/VisualBench/VisualLightweightBenchModule.h b/tools/VisualBench/VisualLightweightBenchModule.h
index 5d4869210b08d8d883946ffa3b6a399e967c4544..0eb024b1814defc814821c96d5949bf49ca493c7 100644
--- a/tools/VisualBench/VisualLightweightBenchModule.h
+++ b/tools/VisualBench/VisualLightweightBenchModule.h
@@ -34,6 +34,7 @@ public:
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 @@ private:
* In either case we reset the context.
*/
enum State {
+ kWarmup_State,
kPreWarmLoopsPerCanvasPreDraw_State,
kPreWarmLoops_State,
kTuneLoops_State,
@@ -76,6 +78,7 @@ private:
void resetTimingState();
void postDraw(SkCanvas*);
void recordMeasurement();
+ void warmup(SkCanvas* canvas);
struct Record {
SkTArray<double> fMeasurements;
« no previous file with comments | « bench/RectBench.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698