Skip to content

Add ImageBitmapRendering + OffscreenCanvas (on main thread) rendering mode #37

Closed

Description

@jsantell

While we could use ImageBitmapRenderingContext in the main thread and blit textures using that instead of Canvas2DRenderingContexts in a more efficient way, the bitmap rendering and offscreen canvas APIs are related and if supported, should both be available, meaning we can always do rendering in a worker for this codepath. We could transferControlToOffscreen for each model element, and then we'd have multiple WebGL contexts in a worker, or multiple workers, but unclear if that's more performant than a single context in a worker sending out textures. Also if one can crop the bitmaps created from there.

More info: #10 (comment)

Dependent on #10 in some cases, but after writing this, now I'm not sure.

Activity

  1. changed the title [-]ImageBitmapRendering + OffscreenCanvas[/-] [+]Add ImageBitmapRendering + OffscreenCanvas (on main thread) rendering mode[/+] on Nov 15, 2018
  2. jsantell commented on Nov 15, 2018

    @jsantell
    ContributorAuthor

    More info on using ImageBitmapRenderingContext: immersive-web/webxr-polyfill#35

    Unknown of the perf differences between using OffscreenCanvas+ImageBitmapRenderingContext vs Canvas+createImageBitmap (see the two paths if ImageBitmaps are supported: https://github.com/immersive-web/webxr-polyfill/pull/35/files#diff-dab36612a4edbca71c1d3c92d6d5790fR365) -- although using OffscreenCanvas would pave the way for OffscreenCanvas in a worker (which is probably the most performant)

  3. added
    type: chore
    on Nov 15, 2018
  4. cdata commented on May 17, 2019

    @cdata
    Contributor

    Tracking a related Chrome bug to this: https://bugs.chromium.org/p/chromium/issues/detail?id=907141#c8

    The bug is a blocker if we ever want to render from a worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions