1 Desktop 2 ======= 3 4 Instructions to get started with Skia on desktop systems (Linux, Mac OS X, or Windows). 5 6 1. [Download Skia](/user/download) 7 8 <!--?prettify lang=sh?--> 9 10 git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' 11 export PATH="${PWD}/depot_tools:${PATH}" 12 git clone 'https://skia.googlesource.com/skia.git' 13 cd skia 14 15 (On Windows without git, swap steps 1 and 2) 16 17 2. Install system-specific prerequisites. 18 - [Linux](/user/quick/linux) 19 - [Mac OS X](/user/quick/macos) 20 - [Windows](/user/quick/windows) 21 22 3. Sync dependencies and config. Build. Run tests. 23 24 <!--?prettify lang=sh?--> 25 26 python bin/sync-and-gyp 27 ninja -C out/Debug 28 out/Debug/dm 29 30 Gyp Options 31 ----------- 32 33 Skia relies on Gyp to generate build files. Read about 34 [specifying options for Gyp](/user/tips#gypdefines) to set the 35 compile-time settings, compiler (e.g. use clang instead of gcc), build systems, 36 and build directory. 37 38 Run unit and correctness tests 39 ------------------------------ 40 41 [DM](../../dev/testing/testing) ("diamond master") is the Skia test app. 42 43 <!--?prettify lang=sh?--> 44 45 ninja -C out/Debug dm 46 out/Debug/dm 47 48 Run Skia samples 49 ---------------- 50 51 [SampleApp](../sample/sampleapp) is the Skia sample program. 52 53 <!--?prettify lang=sh?--> 54 55 ninja -C out/Debug SampleApp 56 out/Debug/SampleApp 57 58 Build non-debug binaries 59 ------------------------ 60 61 The usual mode you want for testing is Debug mode (`SK_DEBUG` is 62 defined, and debug symbols are included in the binary). If you 63 would like to build the Release mode: 64 65 <!--?prettify lang=sh?--> 66 67 ninja -C out/Release 68 69 Performance tests 70 ----------------- 71 72 Build and run nanobench (performance tests). In this case, we will 73 build with the "Release" configuration, since we are running 74 performance tests. 75 76 <!--?prettify lang=sh?--> 77 78 ninja -C out/Release nanobench 79 out/Release/nanobench 80 out/Release/nanobench --skps .../path/to/*.skp 81 82 <!-- TODO(mtklein): document nanobench --> 83 84 Keeping up to date 85 ------------------ 86 87 <!--?prettify lang=sh?--> 88 89 git fetch origin 90 git checkout origin/master 91 92 Contribute to Skia 93 ------------------ 94 95 [How to use Git and Git-cl to contribute to Skia](/dev/contrib/submit). 96