skia2/experimental/pathkit
Kevin Lubick 5f0e3a158a [PathKit] Made some APIs return null if things failed
This makes our calls to emscripten::val a bit more consistent.

Adds in the macro SkPathOrVal to self-document where it's really
a SkPath we are returning, but C++ doesn't realize SkPath and
emscripten::val::null() can be the same type.  Casting SkPath
via emscripten::val() is basically a no-op, since Emscripten bind
seems to be doing it under the hood anyway.

No functional changes, except when there would be a failure,
methods will return null instead of an empty SkPath.

Bug: skia:8216
Change-Id: I1fff620d5aa50ec4a57f76e706d8d005ea26605f
Reviewed-on: https://skia-review.googlesource.com/145728
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-07 16:41:58 +00:00
..
docker [PathKit] Add more Path2D functionality and move some methods to be members 2018-08-06 19:07:12 +00:00
npm-wasm [PathKit] Made some APIs return null if things failed 2018-08-07 16:41:58 +00:00
.gitignore Productionize PathKit 2018-08-02 16:31:23 +00:00
compile.sh [PathKit] Add more Path2D functionality and move some methods to be members 2018-08-06 19:07:12 +00:00
Makefile [PathKit] Add more Path2D functionality and move some methods to be members 2018-08-06 19:07:12 +00:00
pathkit_wasm_bindings.cpp [PathKit] Made some APIs return null if things failed 2018-08-07 16:41:58 +00:00
README.md Productionize PathKit 2018-08-02 16:31:23 +00:00
serve.py Productionize PathKit 2018-08-02 16:31:23 +00:00

PathKit WASM API

This library lets you use Skia's feature-rich PathOps API in the browser.

Compiling the source

Download the Enscriptem SDK.

Set the EMSDK environment variable to the directory you installed it to.

Run ./experimental/pathkit/compile.sh to compile a production, WASM build to $SKIA_HOME/out/pathkit. Add "--help" for more options.