blob: 12002caa642080a4f521235bab0bb069a067b2a7 [file] [log] [blame] [view]
commit-bot@chromium.org8f220112014-01-24 19:25:39 +00001Skia Quickstart Guide
2=====================
3
commit-bot@chromium.org07b74622014-04-21 19:18:46 +00004
5WARNING: Several steps in this guide are out of sync with our automatically-
6tested, officially-supported processes for checking out and building Skia.
Thiago Farina4c93a122015-02-03 13:12:54 -02007The officially supported processes are the ones documented in https://skia.org;
8see https://skia.org/user/quick.
commit-bot@chromium.org07b74622014-04-21 19:18:46 +00009
10The steps documented within this file are more experimental in nature.
11
12
commit-bot@chromium.org71e800a2014-04-16 19:21:00 +000013This guide assumes you've got `git`, `ninja`, and `python` on your path.
commit-bot@chromium.org8f220112014-01-24 19:25:39 +000014
commit-bot@chromium.org71e800a2014-04-16 19:21:00 +0000151. First, checkout Skia:
16 * `git clone https://skia.googlesource.com/skia.git`
commit-bot@chromium.org8f220112014-01-24 19:25:39 +000017 * `cd skia`
commit-bot@chromium.org71e800a2014-04-16 19:21:00 +0000182. Then download the dependencies. You only need to rerun this when
19 the dependencies change.
20 * `python tools/git-sync-deps`
commit-bot@chromium.org8f220112014-01-24 19:25:39 +0000213. 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.
23 * `GYP_GENERATORS=ninja ./gyp_skia`
244. Now, let's build Skia. There are a few options:
25 * `ninja -C out/Debug`: no optimization, asserts enabled
26 * `ninja -C out/Release`: optimization, asserts disabled
27 * `ninja -C out/Coverage`: no optimization, asserts enabled, code coverage generated
285. Run some tests:
tfarinae37ecd72014-10-09 08:56:55 -070029 * `out/Debug/dm`: runs golden master tests from gm/, unit tests from tests/
commit-bot@chromium.org8f220112014-01-24 19:25:39 +0000306. Make some changes:
31 * `git checkout -b my-new-feature origin/master`
32 * `vim src/...`
33 * `git commit -am "Changes for my new feature."`
34 * `vim tests/...`
35 * `git commit --amend -a`
tfarinae37ecd72014-10-09 08:56:55 -070036 * `ninja -C out/Debug && out/Debug/dm && echo ok`
commit-bot@chromium.org8f220112014-01-24 19:25:39 +0000377. Rebase your change onto the latest Skia code:
38 * `git pull --rebase`
tfarinae37ecd72014-10-09 08:56:55 -070039 * `ninja -C out/Debug && out/Debug/dm && echo ok`
commit-bot@chromium.org8f220112014-01-24 19:25:39 +0000408. Upload your change and send it out for review:
41 * `git cl upload -r my-skia-reviewer@google.com -s`
42 * `git cl web`
439. Go through code review, get an LGTM, submit using the checkbox on the code review page.