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