Intent to Ship: WebGPU extended range (HDR) support

21 views
Skip to first unread message

Christopher Cameron

unread,
10:19 AM (2 hours ago) 10:19 AM
to blink-dev

Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.


Contact emails

ccam...@chromium.org

Explainer

None

Specification

https://www.w3.org/TR/webgpu/#gpucanvastonemappingmode

Design docs


https://github.com/ccameron-chromium/webgpu-hdr/blob/main/EXPLAINER.md

Summary

Adds tone mapping parameters to the WebGPU canvas configuration, and adds options of "standard" (the current behavior of restricting content to the SDR range of the display) as the default, and "extended" (not imposing this restriction) as a new behavior. This allows WebGPU content to use the full range of a display.



Blink component

Blink>WebGPU

Search tags

WebGPUHDRCanvas

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None. This feature has been developed with and reviewed by representatives of Mozilla and WebKit, and maps to mature APIs present on all platforms (except ChromeOS, where support is coming soon).



Gecko: Positive (https://github.com/gpuweb/gpuweb/pull/4500) Approval does not automatically imply positive signal for Mozilla, but approver communicated that it does here (can file for signal if requested).

WebKit: Positive (https://github.com/gpuweb/gpuweb/pull/4500) Approval implies positive signal for Safari, in WebGPU WG.

Web developers: Positive (https://github.com/gpuweb/gpuweb/issues/4239#issuecomment-1935112593) Several requests have been made for this feature.

Other signals: PR (https://github.com/gpuweb/gpuweb/pull/4500) reviewed by kdashg at Mozilla and mwyrzykowski at WebKit

Ergonomics

This maps directly to the platform APIs that are used for HDR video and image rendering, and should require almost no additional work to support. On some platforms, this maps directly to the exact underlying API, while on other platforms some conversion is required.



Activation

This can be used immediately by developers.



Security

This introduces no new security or privacy issues.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None. WebView does not current support this (because it does not support HDR images), but the support for both features will come simultaneously.



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

ChromeOS platform support for HDR images (and canvas) has not been completed.



Is this feature fully tested by web-platform-tests?

No

Issues with testing the rendering of HDR (images, video, and now also canvas) is discussed at: https://github.com/web-platform-tests/wpt/issues/44320



Flag name on chrome://flags

None

Finch feature name

WebGPUHDR

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/333967627

Adoption expectation

Feature is currently being used by specific partners in prototypes. It is also used in internal features.

Sample links


https://ccameron-chromium.github.io/webgpu-hdr/example.html

Estimated milestones

Shipping on desktop128
Shipping on Android128
Shipping on WebView128


Anticipated spec changes

This was split off from a larger "HDR for all HTMLCanvasElement" spec. This feature is planned to be added to WebGL soon. Additional tone mapping modes are planned to be added as they are published.

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6196313866895360?gate=6588754021318656

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/S609KGTkSSk/m/1EW4CWn3BgAJ

Christopher Cameron

unread,
11:13 AM (1 hour ago) 11:13 AM
to blink-dev
On Tue, Jul 16, 2024 at 10:19 AM Christopher Cameron <ccam...@google.com> wrote:

Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.


FYI, the wider-scoped feature had a TAG review last year here.
Reply all
Reply to author
Forward
0 new messages