tree: c031a2058c1907ae11416191aff5e1fcbaf8ceb2 [path history] [tgz]
  1. .gitignore
  2. CHANGELOG.md
  3. Makefile
  4. README.md
  5. WasmAliases.h
  6. canvaskit/
  7. canvaskit_bindings.cpp
  8. compile.sh
  9. cpu.js
  10. debug.js
  11. externs.js
  12. font.js
  13. fonts/
  14. gpu.js
  15. helper.js
  16. htmlcanvas/
  17. interface.js
  18. karma.bench.conf.js
  19. karma.conf.js
  20. package.json
  21. paragraph.js
  22. paragraph_bindings.cpp
  23. particles.js
  24. particles_bindings.cpp
  25. pathops.js
  26. perf/
  27. postamble.js
  28. preamble.js
  29. ready.js
  30. release.js
  31. rt_shader.js
  32. serve.py
  33. skottie.js
  34. skottie_bindings.cpp
  35. skp.js
  36. tests/
modules/canvaskit/README.md

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.