title: ‘How to download Skia’ linkTitle: ‘Download’
depot_tools
and GitFollow the instructions on Installing Chromium's depot_tools to download depot_tools
(which includes gclient, git-cl, and Ninja). Below is a summary of the necessary steps.
git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' export PATH="${PWD}/depot_tools:${PATH}"
depot_tools
will also install Git on your system, if it wasn't installed already.
bazelisk
If you intend to add or remove files, or change #includes, you will need to use Bazel to regenerate parts of the BUILD.bazel files. Instead of installing Bazel manually, we recommend you install Bazelisk, which will fetch the appropriate version of Bazel for you (as specified by //.bazelversion).
ninja
Ninja can be supplied using gclient
or with bin/fetch-ninja
.
Skia can either be cloned using git
or the fetch
tool that is installed with depot_tools
.
git clone https://skia.googlesource.com/skia.git # or # fetch skia cd skia python3 tools/git-sync-deps bin/fetch-ninja
You will probably now want to build Skia.
At this point, you have everything you need to build and use Skia! If you want to make changes, and possibly contribute them back to the Skia project, read How To Submit a Patch.