Support `desynchronized` canvas context attribute
#8 406 ouverte le 5 avr. 2019
Métriques du dépôt
- Stars
- (27 361 étoiles)
- Métriques de merge PR
- (Merge moyen 19j 10h) (147 PRs mergées en 30 j)
Description
Chrome has recently added a desynchronized canvas context attribute that disables double buffering for canvases to achieve lower latency. It will be available by default on Chrome 75 (currently on Canary), it's possible to make it available in Chrome 73 by enabling chrome://flags/#enable-experimental-web-platform-features.
We should add desynchronized to EmscriptenWebGLContextAttributes, and if true, set both desynchronized and lowLatency properties to true in the getContext call that creates the context. lowLatency is the old name for this feature, used up until Chrome 74.
If needed for debugging and writing unit tests, ctx.getContextAttributes() can be called on the created context to check if the flag is supported and was accepted.
See https://www.chromestatus.com/feature/6360971442388992 and https://docs.google.com/document/d/1-Z_dj9AQ4SjgDLAEY3ELR0YrlHR3JZyJPhaHAstS5WU/edit# (this link focuses mostly on ChromeOS).