diff options
author | Brian Osman <brianosman@google.com> | 2018-07-24 18:01:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-30 15:00:25 +0000 |
commit | b63f6005c1a72758a976984b1b00de4b1e66418b (patch) | |
tree | 0741e36b287f01eda554144004fed52dd2894753 /tools/viewer/Viewer.cpp | |
parent | 069b2cf19f1feedefa17e92e7418670f3a54ea09 (diff) |
Add 'u' to zoom stats display on high DPI devices
Still need to connect this to ImGui, but this is already useful
Bug: skia:
Change-Id: I925c7a9d6236cb2d865d45d6a68a5709bf2e3df7
Reviewed-on: https://skia-review.googlesource.com/143158
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/viewer/Viewer.cpp')
-rw-r--r-- | tools/viewer/Viewer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 8f1d7bbbc8..b5a9084645 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -183,6 +183,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData) , fZoomWindowFixed(false) , fZoomWindowLocation{0.0f, 0.0f} , fLastImage(nullptr) + , fZoomUI(false) , fBackendType(sk_app::Window::kNativeGL_BackendType) , fColorMode(ColorMode::kLegacy) , fColorSpacePrimaries(gSrgbPrimaries) @@ -480,6 +481,11 @@ Viewer::Viewer(int argc, char** argv, void* platformData) this->updateTitle(); fWindow->inval(); }); + fCommands.addCommand('u', "GUI", "Zoom UI", [this]() { + fZoomUI = !fZoomUI; + fStatsLayer.setDisplayScale(fZoomUI ? 2.0f : 1.0f); + fWindow->inval(); + }); // set up slides this->initSlides(); |