OLD | NEW |
1 Skia Quickstart Guide | 1 Skia Quickstart Guide |
2 ===================== | 2 ===================== |
3 | 3 |
4 | 4 |
5 WARNING: Several steps in this guide are out of sync with our automatically- | 5 WARNING: Several steps in this guide are out of sync with our automatically- |
6 tested, officially-supported processes for checking out and building Skia. | 6 tested, officially-supported processes for checking out and building Skia. |
7 The officially supported processes are the ones documented in skiadocs; see | 7 The officially supported processes are the ones documented in skiadocs; see |
8 https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides | 8 https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides |
9 | 9 |
10 The steps documented within this file are more experimental in nature. | 10 The steps documented within this file are more experimental in nature. |
11 | 11 |
12 | 12 |
13 This guide assumes you've got `git`, `ninja`, and `python` on your path. | 13 This guide assumes you've got `git`, `ninja`, and `python` on your path. |
14 | 14 |
15 1. First, checkout Skia: | 15 1. First, checkout Skia: |
16 * `git clone https://skia.googlesource.com/skia.git` | 16 * `git clone https://skia.googlesource.com/skia.git` |
17 * `cd skia` | 17 * `cd skia` |
18 2. Then download the dependencies. You only need to rerun this when | 18 2. Then download the dependencies. You only need to rerun this when |
19 the dependencies change. | 19 the dependencies change. |
20 * `python tools/git-sync-deps` | 20 * `python tools/git-sync-deps` |
21 3. Create our Ninja build files from our Gyp meta-build files. You only need | 21 3. Create our Ninja build files from our Gyp meta-build files. You only need |
22 to rerun this when you sync or change a `.gyp` file. | 22 to rerun this when you sync or change a `.gyp` file. |
23 * `GYP_GENERATORS=ninja ./gyp_skia` | 23 * `GYP_GENERATORS=ninja ./gyp_skia` |
24 4. Now, let's build Skia. There are a few options: | 24 4. Now, let's build Skia. There are a few options: |
25 * `ninja -C out/Debug`: no optimization, asserts enabled | 25 * `ninja -C out/Debug`: no optimization, asserts enabled |
26 * `ninja -C out/Release`: optimization, asserts disabled | 26 * `ninja -C out/Release`: optimization, asserts disabled |
27 * `ninja -C out/Coverage`: no optimization, asserts enabled, code coverage g
enerated | 27 * `ninja -C out/Coverage`: no optimization, asserts enabled, code coverage g
enerated |
28 5. Run some tests: | 28 5. Run some tests: |
29 * `out/Debug/tests`: runs unit tests from tests/ | 29 * `out/Debug/dm`: runs golden master tests from gm/, unit tests from tests/ |
30 * `out/Debug/dm`: runs golden master tests from gm/ | |
31 6. Make some changes: | 30 6. Make some changes: |
32 * `git checkout -b my-new-feature origin/master` | 31 * `git checkout -b my-new-feature origin/master` |
33 * `vim src/...` | 32 * `vim src/...` |
34 * `git commit -am "Changes for my new feature."` | 33 * `git commit -am "Changes for my new feature."` |
35 * `vim tests/...` | 34 * `vim tests/...` |
36 * `git commit --amend -a` | 35 * `git commit --amend -a` |
37 * `ninja -C out/Debug && out/Debug/tests && out/Debug/dm && echo ok` | 36 * `ninja -C out/Debug && out/Debug/dm && echo ok` |
38 7. Rebase your change onto the latest Skia code: | 37 7. Rebase your change onto the latest Skia code: |
39 * `git pull --rebase` | 38 * `git pull --rebase` |
40 * `ninja -C out/Debug && out/Debug/tests && out/Debug/dm && echo ok` | 39 * `ninja -C out/Debug && out/Debug/dm && echo ok` |
41 8. Upload your change and send it out for review: | 40 8. Upload your change and send it out for review: |
42 * `git cl upload -r my-skia-reviewer@google.com -s` | 41 * `git cl upload -r my-skia-reviewer@google.com -s` |
43 * `git cl web` | 42 * `git cl web` |
44 9. Go through code review, get an LGTM, submit using the checkbox on the code re
view page. | 43 9. Go through code review, get an LGTM, submit using the checkbox on the code re
view page. |
OLD | NEW |