8cfcfaecb6
* Made several changes to the Bazel rules to work around an issue with the Closure compiler and Asyncify and a WASM code-size issue on debug builds. * The native draw code now invokes Skia using the Dawn backend. The example uses `SkSurface::flushAndSubmit` and Emscripten's Asyncify feature to synchronize animation frames with the underlying WebGPU command queue completion. * Cosmetic changes to the HTML with CSS and an animation loop that alternates the canvas color between cyan and magenta every second. Bug: skia:12512 Change-Id: I9888bbec89c2fb01676898ffe4a7071d8690611e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530856 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Arman Uguray <armansito@google.com>
19 lines
826 B
Makefile
19 lines
826 B
Makefile
release:
|
|
bazelisk build //experimental/webgpu-bazel/src:hello-world-wasm --compilation_mode opt \
|
|
--sandbox_base=/dev/shm --gpu_backend=dawn_backend
|
|
- rm -rf build/
|
|
mkdir build
|
|
cp ../../bazel-bin/experimental/webgpu-bazel/src/hello-world-wasm/hello-world.js build/hello-world.js
|
|
cp ../../bazel-bin/experimental/webgpu-bazel/src/hello-world-wasm/hello-world.wasm build/hello-world.wasm
|
|
|
|
debug:
|
|
bazelisk build //experimental/webgpu-bazel/src:hello-world-wasm --compilation_mode dbg \
|
|
--sandbox_base=/dev/shm --gpu_backend=dawn_backend
|
|
- rm -rf build/
|
|
mkdir build
|
|
cp ../../bazel-bin/experimental/webgpu-bazel/src/hello-world-wasm/hello-world.js build/hello-world.js
|
|
cp ../../bazel-bin/experimental/webgpu-bazel/src/hello-world-wasm/hello-world.wasm build/hello-world.wasm
|
|
|
|
serve:
|
|
python3 ../../tools/serve_wasm.py
|