Fix resource and skp paths in Android viewer

Docs-Preview: https://skia.org/?cl=18037
Change-Id: If92e561c6c24de1f51f81477d89b927e10308f13
Reviewed-on: https://skia-review.googlesource.com/18037
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2017-05-26 12:06:21 -04:00 committed by Skia Commit-Bot
parent e28bbcf0f6
commit 96789b31f2
3 changed files with 6 additions and 4 deletions

View File

@ -30,6 +30,8 @@ The Viewer APK must be built by gradle which can be invoked on the command line
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.
iOS
---
The viewer is currently not supported on iOS.

View File

@ -146,8 +146,8 @@ DEFINE_bool(list, false, "List samples?");
#endif
#ifdef SK_BUILD_FOR_ANDROID
static DEFINE_string(skps, "/data/local/tmp/skia", "Directory to read skps from.");
static DEFINE_string(jpgs, "/data/local/tmp/skia", "Directory to read jpgs from.");
static DEFINE_string(skps, "/data/local/tmp/skps", "Directory to read skps from.");
static DEFINE_string(jpgs, "/data/local/tmp/resources", "Directory to read jpgs from.");
#else
static DEFINE_string(skps, "skps", "Directory to read skps from.");
static DEFINE_string(jpgs, "jpgs", "Directory to read jpgs from.");
@ -281,7 +281,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
SkCommandLineFlags::Parse(argc, argv);
#ifdef SK_BUILD_FOR_ANDROID
SetResourcePath("/data/local/tmp/skia");
SetResourcePath("/data/local/tmp/resources");
#endif
if (FLAGS_atrace) {

View File

@ -27,7 +27,7 @@ void android_main(struct android_app* state) {
static const char* gCmdLine[] = {
"viewer",
"--skps",
"/data/local/tmp/skp",
"/data/local/tmp/skps",
// TODO: figure out how to use am start with extra params to pass in additional arguments at
// runtime
// "--atrace",