-
Notifications
You must be signed in to change notification settings - Fork 329
Labels
copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)Pure editorial stuff (copyediting, *.bs file syntax, etc.)
Milestone
Description
EDIT: Updated title to reflect both: issues with invisible canvases, and general unreliability of timing in the event loop.
Right now it's not clear whether Update the rendering of the WebGPU canvas gets called for canvases not in the DOM. This affects the advancement of the frame, i.e. whether the next call to getCurrentTexture()
will return the same texture or a new one.
WebGL (with preserveDrawingBuffer: false
) has an equivalent question, which is whether the drawing buffer gets replaced or not. This test case tries to test that: https://codepen.io/kainino0x/pen/mdxKKyM
Unfortunately, the results are kind of wonky.
- Firefox and Chrome seem to advance the frame only if the canvas is actually visible (inside the viewport) OR it's had transferControlToOffscreen called on it. Neither of them advances a
new OffscreenCanvas
. - Safari seems to advances the frame as long as it's in the DOM. (no OffscreenCanvas support)
Tasks (see below)
- Figure out behavior for canvases
- Consider if behavior for external textures should match closer to behavior for canvases
Metadata
Metadata
Assignees
Labels
copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)Pure editorial stuff (copyediting, *.bs file syntax, etc.)