Skip to content

Support desynchronized canvas context attribute #8406

Closed

Description

@Matheus28

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).

Activity

  1. stale commented on Apr 11, 2020

    @stale

    This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

  2. hsdk123 commented on Nov 23, 2022

    @hsdk123

    This seems important - can we get this reopened and done?
    @Matheus28 @kripken

  3. hsdk123 commented on Jan 19, 2025

    @hsdk123

    Any updates here?

  4. UnknownHacker1 commented on Jun 23, 2026

    @UnknownHacker1
    Contributor

    Opened a PR for this. Quick question on testing: since browser support for desynchronized is platform-dependent, asserting the readback value could be flaky in CI. Would a test that hooks getContext to check the requested attribute be preferred instead?

  5. sbc100 commented on Jun 23, 2026

    @sbc100
    Collaborator

    I think maybe you can just can just setup the test such that is asserts on platforms we expect it work. e.g. on chrome. On other browsers we can assert the opposite?

  6. added a commit that references this issue on Jun 25, 2026
    dde49fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions