WebAssembly / WebAssembly/wasi-webgpu
Consider removing present method becuase of incompatibility with the web
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 220
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
I think we should consider removing the present() method from graphics-context because it's not really going to work on the web.
The web doesn't let you "present", you just write to the texture that's going the be presented next, and the browser presents it whenever it's ready to do so.
In the name of being compatible with the web platform, we should consider removing it. This would mean that the native hosts will now have to manage presenting on their own.
I'd just point out that it's probably possible to emulate preset behavior by not actually returning the "current-texture" returned by the browser, and instead provide our own texture that we use to copy onto the real "current-texture" when the user calls present. However, this would introduce a bunch of unnecessary overhead, so I don't think we should go there.
(@seanisom I'd love to get your thoughts)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with graphics-context/graphics-context.wit, especially the present() method linked in the issue, and review how the graphics-context interface maps to web presentation. Done means deciding whether present() is removed and documenting or applying the corresponding native-host responsibility, with compatibility implications resolved.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, web-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100