skia2/experimental/webgpu-bazel
Arman Uguray 7bc9970941 [experimental] Add runtime effects to WebGPU demo
Added a radial gradient and a RuntimeEffect to the WebGPU demo.
Both of these exercise shader creation and staging buffer allocation.

Also refactored the C++ code to reuse a GrDirectContext which highly
improves the per-frame performance when using runtime effects. However
this unfortunately triggers skbug.com/13266 so a work-around has been
provided in which the context can conditionally get re-created every
frame, as before.

Bug: skia:12512

Change-Id: Ic3e71679bf449bd8557577f74001f18e300e952a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534756
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-29 21:42:06 +00:00
..
example [experimental] Add runtime effects to WebGPU demo 2022-04-29 21:42:06 +00:00
src [experimental] Add runtime effects to WebGPU demo 2022-04-29 21:42:06 +00:00
.gitignore [experimental] Add WebGPU demo (built with Bazel) 2021-10-12 18:34:55 +00:00
Makefile [experimental] Update WebGPU/Bazel demo 2022-04-29 21:07:31 +00:00