add --stats to start with the stats overlay on
Change-Id: Ibc0a47258009a24bf7d9b378c9e21729b13d0216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286027
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 8e20bb5..1166779 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -133,6 +133,7 @@
static DEFINE_bool(offscreen, false, "Force rendering to an offscreen surface.");
static DEFINE_bool(skvm, false, "Try to use skvm blitters for raster.");
static DEFINE_bool(dylib, false, "JIT via dylib (much slower compile but easier to debug/profile)");
+static DEFINE_bool(stats, false, "Display stats overlay on startup.");
#ifndef SK_GL
static_assert(false, "viewer requires GL backend for raster.")
@@ -328,7 +329,7 @@
fRefresh = FLAGS_redraw;
// Configure timers
- fStatsLayer.setActive(false);
+ fStatsLayer.setActive(FLAGS_stats);
fAnimateTimer = fStatsLayer.addTimer("Animate", SK_ColorMAGENTA, 0xffff66ff);
fPaintTimer = fStatsLayer.addTimer("Paint", SK_ColorGREEN);
fFlushTimer = fStatsLayer.addTimer("Flush", SK_ColorRED, 0xffff6666);