483c772cfd
This moves DMFontMgr and several related files which are tightly related to fonts into tools/fonts, moves some flags around to prevent duplication, and adds the nativeFonts handling to Viewer. Change-Id: Id1bdad708a6b74319ac5ac9adfe21025db4ca0b2 Reviewed-on: https://skia-review.googlesource.com/108904 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> |
||
---|---|---|
.. | ||
jni | ||
download_model | ||
generate_gn_args | ||
gm_knowledge.cpp | ||
gm_knowledge.h | ||
gm_runner.cpp | ||
gm_runner.h | ||
gn_to_bp.py | ||
inflate.py | ||
make_apk.sh | ||
make_gmkb.go | ||
make_known_tests.sh | ||
make_model.sh | ||
make_universal_apk | ||
README.md | ||
remove_unneeded_assets | ||
run_skqp_exe | ||
setup_resources | ||
skqp_asset_manager.h | ||
skqp.cpp | ||
sysopen.py | ||
upload_model |
SkQP
SkQP (Skia Quality Program) is a component of the Android CTS (Compatablity Test Suite) that tests an Android device's GPU and OpenGLES & Vulkan drivers using Skia's existing unit & rendering tests.
See https://skia.org/dev/testing/skqp for pre-build APKs.
How to build and run the SkQP tests
-
Get the dependencies:
-
You will need Java JDK 8,
git
, andpython
. -
Install Chromium's depot_tools. Add it to your
PATH
.git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' export PATH="${PWD}/depot_tools:${PATH}"
-
Install the Android NDK.
( cd ~; unzip ~/Downloads/android-ndk-*.zip ) ANDROID_NDK=$(ls -d ~/android-ndk-*) # Or wherever you installed the Android NDK.
-
Install the Android SDK. Set the
ANDROID_HOME
environment variable.mkdir ~/android-sdk ( cd ~/android-sdk; unzip ~/Downloads/sdk-tools-*.zip ) yes | ~/android-sdk/tools/bin/sdkmanager --licenses export ANDROID_HOME=~/android-sdk # Or wherever you installed the Android SDK.
Put
adb
in yourPATH
.export PATH="${PATH}:${ANDROID_HOME}/platform-tools"
-
-
Get the right version of Skia:
git clone https://skia.googlesource.com/skia.git cd skia git checkout origin/skqp/dev # or whatever release tag you need
-
Download dependencies and the model:
python tools/skqp/download_model python tools/skqp/setup_resources python tools/git-sync-deps
-
Configure the build:
python tools/skqp/generate_gn_args out/skqp-arm "$ANDROID_NDK" \ --arch arm \ --api_level 26 bin/gn gen out/skqp-arm
If you want to test another architecture, replace
arm
withx86
,x64
orarm64
. Run 'python tools/skqp/generate_gn_args -h' for all options. -
Build, install, and run.
platform_tools/android/bin/android_build_app -C out/skqp-arm skqp adb install -r out/skqp-arm/skqp.apk adb logcat -c adb shell am instrument -w org.skia.skqp/android.support.test.runner.AndroidJUnitRunner
-
Monitor the output with:
adb logcat org.skia.skqp skia "*:S"
Note the test's output path on the device. It will look something like this:
01-23 15:22:12.688 27158 27173 I org.skia.skqp: output written to "/storage/emulated/0/Android/data/org.skia.skqp/files/output"
-
Retrieve and view the report with:
OUTPUT_LOCATION="/storage/emulated/0/Android/data/org.skia.skqp/files/output" adb pull $OUTPUT_LOCATION /tmp/ tools/skqp/sysopen.py /tmp/output/skqp_report/report.html
Run as a non-APK executable
-
Follow steps 1-3 as above.
-
Build the SkQP program, load files on the device, and run skqp:
ninja -C out/skqp-arm skqp python tools/skqp/run_skqp_exe out/skqp-arm