Intent to Ship: Adding ImageBitmapRenderingContext to OffscreenCanvas

102 views
Skip to first unread message

Juanmi Huertas

unread,
May 15, 2019, 11:50:52 PM5/15/19
to blink-dev

Contact emails

juan...@chromium.org, fs...@chromium.org


Explainer

https://html.spec.whatwg.org/#the-imagebitmap-rendering-context and https://html.spec.whatwg.org/#the-offscreencanvas-interface.


Spec

https://html.spec.whatwg.org/#the-imagebitmap-rendering-context and https://html.spec.whatwg.org/#the-offscreencanvas-interface.

The changes for OffscreenCanvas support: https://github.com/whatwg/html/pull/4455/files


Summary

We are adding ImageBitmapRendererContext as a valid context for OffscreenCanvas. ImageBitmapRenderingContext allows to direct transfer an ImageBitmap to the canvas surface.


This is particularly important as a way to render an ImageBitmap to a Canvas from a Worker (without transfering the ImageBitmap to the main thread).


This is also currently the spec-defined way to render WebGPU content to the screen.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Risks

Interoperability and Compatibility

Firefox: In development

Safari: In development

Web / Framework developers:


Ergonomics

This feature is the new (and only) way for WebGPU to render content to the screen.


Activation

This is a very easy to use feature, as it is consistent with the rest of the usage of both OffscreenCanvas and ImageBitmapRenderingContext (i.e., OffscreenCanvas.getContext(“bitmaprenderer”).


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

There are already some tests that test functionality in offscreencanvas and imagebitmap rendering context. This is the PR with the new web-platform-tests.


Entry on the feature dashboard

https://www.chromestatus.com/feature/5700221617045504


Boris Zbarsky

unread,
May 16, 2019, 12:08:33 AM5/16/19
to Juanmi Huertas, blink-dev
On 5/15/19 5:13 PM, Juanmi Huertas wrote:
> Firefox: In development
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1548049>

Unless I'm missing something, that is not a correct characterization of
that bug report. It's marked "P3", which means "we'll think about
looking at this when there's no other work to be done". There's
certainly no active development going on and no obvious plans for it
that I see.

-Boris

Philip Jägenstedt

unread,
May 16, 2019, 7:07:59 AM5/16/19
to Boris Zbarsky, Juanmi Huertas, blink-dev
The link for Safari is a GitHub comment saying "WebKit would like to implement this", which is a positive signal. The WebKit bug looks like it hasn't been triaged yet so maybe this isn't in development.

In any case, it looks like the spec and test groundwork has been done here, and there is multi-vendor interest, so LGTM1.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/ba647207-5acc-fe8f-89af-e179bdc177b9%40mit.edu.

Yoav Weiss

unread,
May 16, 2019, 9:01:34 AM5/16/19
to Philip Jägenstedt, Boris Zbarsky, Juanmi Huertas, blink-dev
Was there a TAG review for the feature?

Fernando Serboncini

unread,
May 17, 2019, 12:17:23 PM5/17/19
to Yoav Weiss, Philip Jägenstedt, Boris Zbarsky, Juanmi Huertas, blink-dev
Just to clarify the interoperability. Although it's true that the bugs are more "we are aware of it" rather than "in development", we did get an intent to implement from Webkit on the WhatWG PR (linked above). Also, ImageBitmapRenderingContext is now part of the current proposal on how WebGPU renders a texture to the screen, and WebGPU is being actively discussed by all vendors (http://webgpu.io) and with partial implementations on Chrome/Safari.

There was a TAG Review for this feature here: https://github.com/w3ctag/design-reviews/issues/141 which concluded that "we're happy with the shape off ImageBitmapRenderingContext and OffscreenCanvas".

Chris Harrelson

unread,
May 23, 2019, 3:21:35 PM5/23/19
to Fernando Serboncini, Yoav Weiss, Philip Jägenstedt, Boris Zbarsky, Juanmi Huertas, blink-dev

oj...@google.com

unread,
May 23, 2019, 3:26:03 PM5/23/19
to blink-dev, fs...@chromium.org, yo...@yoav.ws, foo...@chromium.org, bzba...@mit.edu, juan...@chromium.org
LGTM2


On Thursday, May 23, 2019 at 12:21:35 PM UTC-7, Chris Harrelson wrote:
LGTM1

On Fri, May 17, 2019 at 9:17 AM Fernando Serboncini <fs...@chromium.org> wrote:
Just to clarify the interoperability. Although it's true that the bugs are more "we are aware of it" rather than "in development", we did get an intent to implement from Webkit on the WhatWG PR (linked above). Also, ImageBitmapRenderingContext is now part of the current proposal on how WebGPU renders a texture to the screen, and WebGPU is being actively discussed by all vendors (http://webgpu.io) and with partial implementations on Chrome/Safari.

There was a TAG Review for this feature here: https://github.com/w3ctag/design-reviews/issues/141 which concluded that "we're happy with the shape off ImageBitmapRenderingContext and OffscreenCanvas".

On Thu, May 16, 2019 at 9:01 AM Yoav Weiss <yo...@yoav.ws> wrote:
Was there a TAG review for the feature?
On Thu, May 16, 2019 at 1:07 PM Philip Jägenstedt <foo...@chromium.org> wrote:
The link for Safari is a GitHub comment saying "WebKit would like to implement this", which is a positive signal. The WebKit bug looks like it hasn't been triaged yet so maybe this isn't in development.

In any case, it looks like the spec and test groundwork has been done here, and there is multi-vendor interest, so LGTM1.

On Thu, May 16, 2019 at 6:08 AM Boris Zbarsky <bzba...@mit.edu> wrote:
On 5/15/19 5:13 PM, Juanmi Huertas wrote:
> Firefox: In development
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1548049>

Unless I'm missing something, that is not a correct characterization of
that bug report.  It's marked "P3", which means "we'll think about
looking at this when there's no other work to be done".  There's
certainly no active development going on and no obvious plans for it
that I see.

-Boris

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

Alex Russell

unread,
May 23, 2019, 3:28:04 PM5/23/19
to blink-dev, fs...@chromium.org, yo...@yoav.ws, foo...@chromium.org, bzba...@mit.edu, juan...@chromium.org
LGTM3

Boris: thanks for continuing to clarify when we have not correctly understood Mozilla's stance on a proposal. The API OWNERs are sensitive to how frustrating this must be and want to improve what gets represented in these fields. Thanks for your patience with us!

Juanmi Huertas

unread,
May 24, 2019, 10:59:01 AM5/24/19
to blink-dev, fs...@chromium.org, yo...@yoav.ws, foo...@chromium.org, bzba...@mit.edu, juan...@chromium.org
Thanks all for the comments and the LGTMs. I'm sorry if there was a confusion when I redacted the "in development" when it was only marked as P3.

Boris Zbarsky

unread,
May 24, 2019, 4:45:55 PM5/24/19
to Alex Russell, blink-dev, fs...@chromium.org, yo...@yoav.ws, foo...@chromium.org, juan...@chromium.org
On 5/23/19 3:28 PM, Alex Russell wrote:
> Boris: thanks for continuing to clarify when we have not correctly
> understood Mozilla's stance on a proposal.

No problem. It doesn't help that it's not always obvious what Mozilla's
position is, of course. ;)

-Boris
Reply all
Reply to author
Forward
0 new messages