skia2/site/user/quick/linux.md
pdr 1e2a702c19 Update dev docs to reference the new skia debugger (skiaserve)
This patch adds a new markdown file describing the new debugger along
with instructions on running it locally and a sweet screenshot. The
screenshot has been sized to not be clipped when viewed in production.

The old documentation for the qt-based debugger has been marked as
deprecated and all docs referencing the old debugger have been updated.

BUG=skia:5493
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2121673002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2121673002

Review-Url: https://codereview.chromium.org/2121673002
2016-07-06 06:10:25 -07:00

2.4 KiB

Linux

Quickstart

# Install depot_tools (this provides ninja and git-cl).
git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
export PATH="${PWD}/depot_tools:${PATH}"

# Get Skia.
git clone 'https://skia.googlesource.com/skia'
cd skia

# Install Dependencies (may require sudo).
tools/install_dependencies.sh

# Sync, Config, and Build.
bin/sync-and-gyp
ninja -C out/Debug dm SampleApp

# Run DM, the Skia test app.
out/Debug/dm

# Run SampleApp.
out/Debug/SampleApp

# Run nanobench, the Skia benchmarking tool.
ninja -C out/Release nanobench
out/Release/nanobench

Prerequisites

On a Ubuntu 12.04 (Precise) or Ubuntu 14.04 (Trusty) system, you can run tools/install_dependencies.sh, which will install the needed packages. On Ubuntu 12.04, you will need to install theninja build tool separately, which comes with Chromium's depot_tools.

To contribute changes back to Skia, you will need git-cl, which comes with Chromium's depot_tools.

(If you use another Linux distribution, please consider contributing back instructions for installing the required packages — we can then incorporate that knowledge into the tools/install_dependencies.sh tool.)

Make sure the following have been installed:

  • Chromium depot_tools

  • A C++ compiler (typically GCC or Clang) build-essential or clang-3.6

  • Python 2.7.x: python2.7-dev

  • The FreeType and Fontconfig font engines: libfreetype6-dev and libfontconfig1-dev

  • Mesa OpenGL utility library headers: libglu1-mesa-dev

  • Mesa headers: mesa-common-dev

  • GL, such as freeglut3-dev

Check out the source code

Follow the instructions here for downloading the Skia source.

Notes

  1. On 32-bit Linux (when uname -m is not x86_64), you will have to explicitly specify the architecture:

    GYP_DEFINES='skia_arch_type=x86' python bin/sync-and-gyp
    
  2. By default, many Linux systems use gcc by default. To use clang you will need to set the CC and CXX environment variables.

Generate build files

See this page for generating build files and run tests.