aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user/sample
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-11-22 10:52:17 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-22 15:55:04 +0000
commit25c0fc8bdb73e17293e6558b47c1f6f63598fa92 (patch)
tree2172816d3501869effd95a4e46e46f705857f3cb /site/user/sample
parent4419a58a9cd494de21d44f63c93edf7f65e36e73 (diff)
Viewer doc cleanup.
No-Try: true Docs-Preview: https://skia.org/?cl=75360 Change-Id: I915ae012e0f80ac2595ec9088ae8339b337e860e Reviewed-on: https://skia-review.googlesource.com/75360 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'site/user/sample')
-rw-r--r--site/user/sample/viewer.md52
1 files changed, 29 insertions, 23 deletions
diff --git a/site/user/sample/viewer.md b/site/user/sample/viewer.md
index f6cd49f85e..340c3e1896 100644
--- a/site/user/sample/viewer.md
+++ b/site/user/sample/viewer.md
@@ -1,16 +1,12 @@
Skia Viewer
==========================
-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.
+The Skia Viewer displays a series of slides that exhibit specific features of Skia, including the Skia golden master images (or GMs) and programmed samples that allow interaction. In addition, the Viewer is used to debug and understand different parts of the Skia system:
-`<skia-path>/out/Release/viewer --resourcePath <skia-path>/resources`
+* Observe rendering performance - placing the Viewer in stats mode displays average frame times.
+* Try different rendering methods - it's possible to cycle among the three rendering methods: raster, OpenGL and Vulkan (on supported platforms). You can use this with stats mode to see the effect that the different rendering methods have on drawing performance.
+* Display and manipulate your own pictures.
-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 '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.
+Some slides require resources stored outside the program. These resources are stored in the `<skia-path>/resources` directory.
Linux, Macintosh and Windows
----------------------------
@@ -18,24 +14,17 @@ Linux, Macintosh and Windows
The Viewer can be built using the regular GN build process, e.g.
bin/gn gen out/Release --args='is_debug=false'
- ninja -C out/Release viewer
-
-Android
--------
-The Viewer APK must be built by gradle which can be invoked on the command line with the following script...
+ ninja -C out/Release/viewer
- ./platform_tools/android/bin/android_build_app -C <out_dir> viewer
+To load resources in the desktop Viewers, use the `--resourcePath` option:
-* <out_dir> is the ninja out directory for android (e.g., `out/arm64`) that you want to use to
-build the app
+ <skia-path>/out/Release/viewer --resourcePath <skia-path>/resources
-Upon completion of the script the APK can be found at <out_dir>/viewer.apk
+Similarly, `--skps <skp-file-path>` will load any `.skp` files in that directory for display within the Viewer.
-To load SKPs in the Android viewer place them in /data/local/tmp/skps.
+Other useful command-line options: using `--match <pattern>` will load only SKPs or slides matching that name; using `--slide <name>` will launch at that slide; and you can start up with a particular rendering method by using `--backend`, i.e., `--backend sw`, `--backend gl`, or `--backend vk`.
-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.
+The desktop Viewers are controlled using the keyboard and mouse: left (&#x2190;) and right (&#x2192;) arrows to move from slide to slide; up (&#x2191;) and down (&#x2193;) arrows to zoom in and out; clicking and dragging will translate. Other display options and a slide picker can be found in the Tools UI, which can be toggled by hitting the spacebar.
Key | Action
-----------------------------|-------------
@@ -43,4 +32,21 @@ Key | Action
&#x2191; &#x2193; | Zoom in / out
d | Change render methods among raster, OpenGL and Vulkan
s | Display rendering times and graph
-SPACE | Toggle display of Tools UI
+Space | Toggle display of Tools UI
+
+Android
+-------
+The Viewer APK must be built by gradle which can be invoked on the command line with the following script:
+
+ ./platform_tools/android/bin/android_build_app -C <out_dir> viewer
+
+where `<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`
+
+To load resources in the Android Viewer place them in `/data/local/tmp/resources`; to load SKPs place them in `/data/local/tmp/skps`.
+
+Swiping left and right will switch slides, pinch-zoom will zoom in and out, and display options are available in the UI.
+
+iOS
+---
+The viewer is not yet fully supported on iOS, but can be used to display individual slides on a device by launching via `ios-deploy` with the `--match` or `--slide` command-line options.