-
Notifications
You must be signed in to change notification settings - Fork 329
Closed
Milestone
Description
WebGL does this:
- If there has been a draw call to the drawing buffer since last Present, snapshot the current contents of the drawing buffer.
- Otherwise, snapshot the contents of the most-recently-Presented frame.
In a sense, toDataURL gives the contents that the page can expect to see next frame, if no other calls are made before next Present.
WebGPU absolutely wants number 2, but while WebGL just has a built-in default framebuffer, WebGPU has more parts: GPUCanvasContext
, GPUSwapChain
, and GPUTexture getCurrentTexture()
.
I suppose a potential solution would be:
- If there has been a call to getCurrentTexture() since last Present, snapshot the current contents of getCurrentTexture.
- Otherwise, snapshot the contents of the most-recently-Presented frame.
This came up in the context of #1474 where we want to also know, for alphaMode:opaque, when/whether we're requiring that toDataURL clears alpha to 1.0.
[edit -KN] Related discussion: #1408 (comment)
Metadata
Metadata
Assignees
Labels
No labels