tree: b24275257e658b1c40706013332a293f62af6050 [path history] [tgz]
  1. BUILD.bazel
  2. PietTypes.h
  4. Render.cpp
  5. Render.h
  6. Scene.cpp
  7. Scene.h

piet-gpu Utilities

This directory provides utilities to ease integrating Skia C++ code with the piet-gpu/pgpu-render Rust crate's C FFI bindings.

Building the piet-gpu library

The code depends on a third-party Rust library which must be compiled manually:

  1. First make sure that a recent version of cargo is installed on your system. Simply follow the instructions on to get started.

  2. Use the Makefile under //third_party/piet-gpu to compile the library:

$ cd $SKIA_ROOT/third_party/piet-gpu
$ make debug

This should create $SKIA_ROOT/third_party/piet-gpu/out/debug/libpgpu_render.dylib if the build is successful. For a release build, run make release instead.

Building Skia with piet support

Build rules are currently only provided for the GN build. To enable piet support, add skia_use_piet=true to your GN args. This will enable both the Skia GN targets and define the SK_ENABLE_PIET_GPU macro which can be used in C++ code to query for support.