f5bc8fba95
Flutter on the web wants to be able to extract arbitrary frames from an animated image and pass those into functions like: drawAtlas, drawImage, drawImageRect This should allow that to happen w/o having to add lots of variants like drawAnimatedImage. If this sticks, is drawAnimatedImage still useful? (maybe it saves a copy?) Change-Id: I99d7045c5dea61d0a1bd6d335c88e7517f2c4fc2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263020 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com> |
||
---|---|---|
.. | ||
canvaskit | ||
fonts | ||
htmlcanvas | ||
perf | ||
tests | ||
.gitignore | ||
canvaskit_bindings.cpp | ||
CHANGELOG.md | ||
compile.sh | ||
cpu.js | ||
debug.js | ||
externs.js | ||
font.js | ||
gpu.js | ||
helper.js | ||
interface.js | ||
karma.bench.conf.js | ||
karma.conf.js | ||
Makefile | ||
package.json | ||
paragraph_bindings.cpp | ||
paragraph.js | ||
particles_bindings.cpp | ||
particles.js | ||
pathops.js | ||
postamble.js | ||
preamble.js | ||
README.md | ||
ready.js | ||
release.js | ||
rt_shader.js | ||
serve.py | ||
skottie_bindings.cpp | ||
skottie.js | ||
skp.js | ||
WasmAliases.h |
Prerequisites
To compile CanvasKit, you will first need to install emscripten
. This
will set the environment EMSDK
(among others) which is required for
compilation.
Compile and Test Locally
make release
make local-example
This will print a local endpoint for viewing the example. You can experiment
with the CanvasKit API by modifying ./canvaskit/example.html
and refreshing
the page. For some more experimental APIs, there's also ./canvaskit/extra.html
.
For other available build targets, see Makefile
and compile.sh
.
For example, building a stripped-down version of CanvasKit with no text support or
any of the "extras", one might run:
./compile.sh no_skottie no_particles no_font
Such a stripped-down version is about half the size of the default release build.