Expand description
Shared plotting context registry for zero-copy rendering.
This module tracks the GPU device/queue exported by the active acceleration
provider so plotting backends (native GUI or wasm/web) can reuse the same
wgpu::Device without creating duplicate adapters. Call
ensure_context_from_provider or install_wgpu_context once a provider
is initialized; subsequent callers can query shared_wgpu_context to
determine whether zero-copy rendering is possible.
Functionsยง
- ensure_
context_ from_ provider - Ensure the shared context is populated by calling back into the acceleration provider. Returns the cached context when available.
- install_
wgpu_ context - Install a shared context that was exported out-of-band (e.g. from a host
application that already called
export_context). - shared_
wgpu_ context - Returns the cached shared WGPU context, if one has been installed.