Add viewer mode to VisualBench.
Displays each benchmark/skp with a graph showing a series of frame times.
Use the space bar to skip to the next benchmark.
Adds an option to hit ESC to quit VisualBench. Useful in fullscreen mode.
Review URL: https://codereview.chromium.org/1336043003
diff --git a/tools/VisualBench/VisualLightweightBenchModule.cpp b/tools/VisualBench/VisualLightweightBenchModule.cpp
index 8f9e488..bc592a3 100644
--- a/tools/VisualBench/VisualLightweightBenchModule.cpp
+++ b/tools/VisualBench/VisualLightweightBenchModule.cpp
@@ -127,7 +127,9 @@
return false;
}
- canvas->clear(0xffffffff);
+ fOwner->clear(canvas, SK_ColorWHITE, 2);
+
+
fBenchmark->preDraw();
fRecords.push_back();
@@ -254,3 +256,7 @@
fCurrentFrame++;
}
}
+
+bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) {
+ return true;
+}