aboutsummaryrefslogtreecommitdiffhomepage
path: root/site
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2016-12-08 12:13:28 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-11 21:32:39 +0000
commitbbab477b49e2aed0f257206ce457814c953d574b (patch)
tree672f175063e479256d78ed6e7198089a24de7446 /site
parent2790c52e36ddd8c46d8238f3c92f47779f79fb69 (diff)
Add documentation for Viewer
BUG=skia:5488 NOTRY=true DOCS_PREVIEW= https://skia.org/?cl=5682 Change-Id: I635468f6a17576e990e159f7f02ba2f1946317ab Reviewed-on: https://skia-review.googlesource.com/5682 Reviewed-by: Heather Miller <hcm@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'site')
-rw-r--r--site/user/sample/viewer.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/site/user/sample/viewer.md b/site/user/sample/viewer.md
new file mode 100644
index 0000000000..df4683ec9f
--- /dev/null
+++ b/site/user/sample/viewer.md
@@ -0,0 +1,38 @@
+Skia Viewer
+==========================
+The Skia Viewer is another windowed app similar to SampleApp. It's main advantages over SampleApp is 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.
+
+`<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.
+
+Linux, Macintosh and Windows
+----------------------------
+
+The Viewer can be built using the regular GN build process, e.g.
+
+ gn gen out/Release --args='is_debug=false'
+ ninja -C out/Release viewer
+
+Android
+-------
+GN support for the Android Viewer is in the process of being addressed.
+
+iOS
+---
+The viewer is currently not supported on iOS.
+
+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
+
+