1How SkQP Generates Render Test Models 2===================================== 3 4We will, at regular intervals, generate new models from the [master branch of 5Skia][1]. Here is how that process works: 6 70. Choose a commit to make the branch from 8 9 COMMIT=origin/master 10 11 Or use the script to find the best one: 12 13 cd SKIA_SOURCE_DIRECTORY 14 git fetch origin 15 COMMIT=$(python tools/skqp/find_commit_with_best_gold_results.py \ 16 origin/master ^origin/skqp/dev) 17 181. Get the positively triaged results from Gold and generate models: 19 20 cd SKIA_SOURCE_DIRECTORY 21 git fetch origin 22 git checkout "$COMMIT" 23 python tools/skqp/cut_release.py HEAD~10 HEAD 24 25 This will create the following files: 26 27 platform_tools/android/apps/skqp/src/main/assets/files.checksum 28 platform_tools/android/apps/skqp/src/main/assets/skqp/rendertests.txt 29 platform_tools/android/apps/skqp/src/main/assets/skqp/unittests.txt 30 31 These three files can be commited to Skia to create a new commit. Make 32 `origin/skqp/dev` a parent of this commit (without merging it in), and 33 push this new commit to `origin/skqp/dev`, using this script: 34 35 sh tools/skqp/branch_skqp_dev.sh 36 37 Review and submit the change: 38 39 git push origin HEAD:refs/for/skqp/dev 40 bin/sysopen https://review.skia.org/$(bin/gerrit-number HEAD) 41 42 (Optional) Make a SkQP APK. 43 44 tools/skqp/docker_build_universal_apk.sh 45 46 (Optional) Test the SkQP APK: 47 48 tools/skqp/test_apk.sh (LOCATION)/skqp-universal-debug.apk 49 50 (Once changes land) Upload the SkQP APK. 51 52 tools/skqp/upload_apk HEAD (LOCATION)/skqp-universal-debug.apk 53 54 55`tools/skqp/cut_release.py` 56--------------------------- 57 58This tool will call `make_skqp_model` to generate the `m{ax,in}.png` files for 59each render test. 60 61Then it calls `jitter_gms` to see which render tests pass the jitter test. 62`jitter_gms` respects the `bad_gms.txt` file by ignoring the render tests 63enumerated in that file. Tests which pass the jitter test are enumerated in 64the file `good.txt`, those that fail in the `bad.txt` file. 65 66Next, the `skqp/rendertests.txt` file is created. This file lists the render 67tests that will be executed by SkQP. These are the union of the tests 68enumerated in the `good.txt` and `bad.txt` files. If the render test is found 69in the `good.txt` file and the model exists, its per-test threshold is set 70to 0 (a later CL can manually change this, if needed). Otherwise, the 71threshold is set to -1; this indicated that the rendertest will be executed (to 72verify that the driver will not crash), but the output will not be compared 73against the model. Unnecessary models will be removed. 74 75Next, all of the files that represent the models are uploaded to cloud storage. 76A single checksum hash is kept in the `files.checksum` file. This is enough 77to re-download those files later, but we don't have to fill the git repository 78with a lot of binary data. 79 80Finally, a list of the current gpu unit tests is created and stored in 81`skqp/unittests.txt`. 82 83[1]: https://skia.googlesource.com/skia/+log/master "Skia Master Branch" 84[2]: https://gold.skia.org/search "Skia Gold Search" 85