-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OffscreenCanvas #161
Comments
We at Adobe are strongly in support of adding this! OffscreenCanvas is an essential capability for highly performant apps that do any sort of rendering. |
In the MDN short survey on APIs & JavaScript, "OffscreenCanvas" was selected by ~12% of survey takers, putting it in the bottom third of options. (There is some uncertainty as with any survey data.) |
We think that this should exclude canvas filter tests, since that's just part of the normal canvas API that isn't directly related to offscreen canvas. |
Thank you for proposing Offscreen Canvas for inclusion in Interop 2023. We are pleased to let you know that this proposal was accepted as the Offscreen Canvas focus area. You can follow the progress of this Focus Area on the Interop 2023 dashboard. For an overview of our process, see the proposal selection summary. Thank you for contributing to Interop 2023! Posted on behalf of the Interop team. |
Description
OffscreenCanvas allows for a faster graphics API that is detached from the Document. It also enables out-of-main-thread graphics API on WebWorkers. The support should include 2D, WebGL, and WebGPU support, both on main thread and on workers.
Rationale
OffscreenCanvas on Workers has a pretty strong developer demand. We can see tutorials and demos all over the place. Developers recognize and identify the multiple use cases: out of main thread rendering, and faster DOM-independent operations. OffscreenCanvas is also widely used inside Google.
On WASM codebases, it’s a necessary API to support out-of-main-thread rendering, which is common in games (with the WebGL context).
For 2D context, the extra performance (a lot of operations are faster on OffscreenCanvas due to its independence from the Document and style) and the ability to step outside the main thread processing (which is often a contentious resource), makes it a widely used feature.
Firefox tracking bug: OffscreenCanvas, 2D.
WebKit tracking bug: OffscreenCanvas.
Specification
WHATWG relevant spec:
https://html.spec.whatwg.org/multipage/canvas.html#the-offscreencanvas-interface
The spec needs some refreshment that we are ready to work on and would do it sooner, if this gets picked up by Interop: we need to clean up the old commit() spec that doesn’t exist anymore, and write a new rendering model for Workers.
Tests
Canvas2D: wpt/html/canvas/offscreen
WebGL: wpt/webgl
WebGPU: gpuweb/cts
The coverage for 2D is pretty broad, including WebWorker, transferred OffscreenCanvas, and main thread.
WebGL has a worker.js IDL test, but it seems to be missing on the repo.
WebGPU has only minor coverage on WPT. We would add at least some basic usage tests (not the full CTS).
The text was updated successfully, but these errors were encountered: