[graphite] Externalize the use of Asyncify to yield in WASM builds.
The use of EM_ASYNC_JS in Skia can cause problems when building
without Asyncify.
The ContextOptions field that controlled whether a Context could
yield is removed. Instead the client provides a "tick" function.
In native the defualt uses wgpu::Device::Tick. In WASM the default
is nullptr, which produces a non-yielding context.
For testing skiatest::graphite::TestOptions is added which
contains skgpu::graphite::ContextOptions and a bool to control
yield-ability. skiatest::graphite::ContextFactory stores this
and passes it to
skiatest::graphite::GraphiteTestContext::makeContext().
Bug: b/309019344
Change-Id: Id9c101796f5471915244ab888b0f30ac4a160880
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/786756
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <briansalomon@gmail.com>
35 files changed