67c905ce6b
Inside SkOpEdgeBuilder::walk(), when current segment is cubic curve, its shape may be reduced, therefore, the curve points should be determined by the reduction result ‘split->fVerb’ instead of ‘verb’. Actually, inside this switch case, ‘verb’ is always ‘SkPath::kCubic_Verb’, which makes the ‘fCanAdd’ always true. The outcome of this bug makes the subsequent logic which depends on ‘fCanAdd’ (L301-332) incorrect, and in some cases, fails the whole boolean operation at L329. The Fiddle below demonstrates how this bug fails a union operation of two paths, by returning an empty path. https://fiddle.skia.org/c/e528567b62bc338cd99f4a89f0c5342e Screen shot of the fiddle: https://www.dropbox.com/s/4bnzlponq6gen27/pathOpsBug.png?dl=0 2nd Fiddle drawing the results (larger) https://fiddle.skia.org/c/1f2a513c2ee0395b9d05fb1eb987b01f Change-Id: If07f54cef1b9409f9b6db27d6294a3e3461b0181 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284426 Commit-Queue: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> |
||
---|---|---|
.. | ||
npm-asmjs | ||
npm-wasm | ||
perf | ||
tests | ||
.gitignore | ||
chaining.js | ||
CHANGELOG.md | ||
compile.sh | ||
externs.js | ||
helper.js | ||
karma.bench.conf.js | ||
karma.conf.js | ||
Makefile | ||
package.json | ||
pathkit_wasm_bindings.cpp | ||
README.md | ||
ready.js | ||
serve.py |
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 ./compile.sh
to compile a production, WASM build to $SKIA_HOME/out/pathkit
.
Add "--help" for more options.
Deploying to npm
# Build all 3 versions (release, test, debug) for both asmjs and WASM
# These binaries will be placed in the proper places of npm-*/bin
# This takes 5-10 minutes.
make npm
# Update the package.json files of both npm-asmjs and npm-wasm
make update-patch # or update-minor or update-major
# Publish both repos
make publish