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 (←) and (→) 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>/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:
--backend gl, or
--backend vk respectively.
--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.
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
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
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 SKPs in the Android viewer place them in /data/local/tmp/skps.
The viewer is currently not supported on iOS.
|Move between the slides
|Zoom in / out
|Change render methods among raster, OpenGL and Vulkan
|Display the rendering time in the menu bar