Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
decoupling
  • Loading branch information
kainino0x committed Apr 9, 2021
commit 804162eb9b0f3a724512fedf2977fc124675b536
6 changes: 6 additions & 0 deletions explainer/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,12 @@ Following this, WebGPU has no "default" drawing buffer.
Instead, a WebGPU device may be connected to *arbitrarily many* canvases (via
`GPUCanvasContext`s) and render to all of them.
Comment thread
kainino0x marked this conversation as resolved.
Outdated

Canvas context creation and WebGPU device creation are decoupled.
Any `GPUCanvasContext` may be dynamically used with any `GPUDevice`.
This makes device switches easy (e.g. after recovering from a device loss).
(In comparison, WebGL context restoration is done on the same `WebGLRenderingContext` object,
even though context state does not persist across loss/restoration.)

In order to access a canvas, an app gets a `GPUTexture` from the `GPUCanvasContext`
and then writes to it, as it would with a normal `GPUTexture`.

Expand Down