aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user/sample/viewer.md
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-11-21 16:58:56 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-22 13:53:34 +0000
commit3ca9a0db91c139432bf1bcd16deecf47b983e176 (patch)
tree0628ba2c5eef6ed603219150698063473b19fc68 /site/user/sample/viewer.md
parenta0ec54829eb77ec51747d2c8fd1ecfb7c0587965 (diff)
Update Viewer docs.
Also deletes SampleApp docs. No-Try: true Docs-Preview: https://skia.org/?cl=74700 Change-Id: Ida594d12db9ea38fdd7d91a920ed1cc7afd04e0d Reviewed-on: https://skia-review.googlesource.com/74700 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'site/user/sample/viewer.md')
-rw-r--r--site/user/sample/viewer.md23
1 files changed, 11 insertions, 12 deletions
diff --git a/site/user/sample/viewer.md b/site/user/sample/viewer.md
index 0f47b9872d..f6cd49f85e 100644
--- a/site/user/sample/viewer.md
+++ b/site/user/sample/viewer.md
@@ -1,16 +1,16 @@
Skia Viewer
==========================
-The Skia Viewer is another windowed app similar to SampleApp. Its main advantages over SampleApp are that it supports Vulkan on Linux, Windows and Android, and it uses a cleaner cross-platform windowing system (currently located in tools/viewer/sk_app). However, it is a work in progress, so it doesn't yet support all the features of SampleApp.
-
-Like SampleApp, it displays a series of slides that exhibit specific features of the Skia system. It is mainly controlled using the keyboard: left (&#x2190;) and (&#x2192;) right arrows to move from slide to slide. Some slides require use resources stored outside the program. These resources are stored in the `<skia-path>/resources` directory.
+The Skia Viewer displays a series of slides that exhibit specific features of the Skia system. It is mainly controlled using the keyboard: left (&#x2190;) and (&#x2192;) right arrows to move from slide to slide. Some slides require use resources stored outside the program. These resources are stored in the `<skia-path>/resources` directory.
`<skia-path>/out/Release/viewer --resourcePath <skia-path>/resources`
In addition to displaying various aspects of Skia, the Viewer is used to debug and understand different parts of the Skia system:
-* Observe rendering performance - pressing the 'f' key places the Viewer in frame rate mode. It continuously draws the slide while desplaying the draw time in the title of the window.
-* Try different rendering methods - pressing the 'd' key cycles among the three rendering methods: raster, OpenGL and Vulkan (on supported platforms). You can use this with the 'f' key to see the effect that the different rendering methods have on drawing performance. You can start up with a particular rendering method by using one of the command line options `--backend sw`, `--backend gl`, or `--backend vk` respectively.
-* Display and manipulate your own pictures - use `--skps <skp-file-path>` to load any `.skp` files to be displayed by the Viewer. Using `--match <slide-name>` will load only SKPs or slides matching that name.
+* Observe rendering performance - pressing the 's' key places the Viewer in stats mode, displaying a bar graph and average frame times.
+* Try different rendering methods - pressing the 'd' key cycles among the three rendering methods: raster, OpenGL and Vulkan (on supported platforms). You can use this with the 's' key to see the effect that the different rendering methods have on drawing performance. You can start up with a particular rendering method by using one of the command line options `--backend sw`, `--backend gl`, or `--backend vk` respectively.
+* Display and manipulate your own pictures - use `--skps <skp-file-path>` to load any `.skp` files to be displayed by the Viewer. Using `--match <pattern>` will load only SKPs or slides matching that name. Using '--slide <name>' will launch at that slide.
+
+Other display options and a slide picker can be found in the Tools UI, which can be toggled by hitting SPACE.
Linux, Macintosh and Windows
----------------------------
@@ -26,7 +26,7 @@ The Viewer APK must be built by gradle which can be invoked on the command line
./platform_tools/android/bin/android_build_app -C <out_dir> viewer
-* **out_dir** is the ninja out directory for android (e.g., `out/arm64`) that you want to use to
+* <out_dir> is the ninja out directory for android (e.g., `out/arm64`) that you want to use to
build the app
Upon completion of the script the APK can be found at <out_dir>/viewer.apk
@@ -35,13 +35,12 @@ To load SKPs in the Android viewer place them in /data/local/tmp/skps.
iOS
---
-The viewer is currently not supported on iOS.
+The viewer is not yet fully supported on iOS, but can be used to display individual slides on a device by launching with the --match or --slide options.
Key | Action
-----------------------------|-------------
&#x2190; &#x2192; | Move between the slides
&#x2191; &#x2193; | Zoom in / out
-d | Change render methods among raster, OpenGL and Vulkan
-f | Display the rendering time in the menu bar
-
-
+d | Change render methods among raster, OpenGL and Vulkan
+s | Display rendering times and graph
+SPACE | Toggle display of Tools UI