Support `desynchronized` canvas context attribute
#8,406 opened on Apr 5, 2019
Repository metrics
- Stars
- (27,361 stars)
- PR merge metrics
- (Avg merge 19d 10h) (147 merged PRs in 30d)
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).