Function shared_gpu
pub fn shared_gpu() -> Result<SharedGpu, OffscreenError>Expand description
Borrow the shared device/queue, initialising the process-wide context
on first call. Fails with the same OffscreenErrors as
OffscreenRenderer::try_new — a machine with no usable adapter
gets a NoAdapter, never a panic.
§Errors
Returns OffscreenError::NoAdapter when no usable GPU adapter exists or the
device cannot be waited for (a browser page), or
OffscreenError::ContextPoisoned when another thread panicked while
holding the shared render-context lock.