Intent to prototype: HDR headroom for drawing to 2D canvas

87 views
Skip to first unread message

Christopher Cameron

unread,
Jul 1, 2025, 8:37:16 AMJul 1
to blink-dev
Hello blink-dev!

After much churn, the industry has converged on a consistent and very-widely adopted way of handling HDR content, based on the concept of HDR headroom.

A core feature unique to HDR is that HDR content can be drawn an infinite number of ways, often unrepresentable as a single bitmap (e.g, gainmap images). There exists a general problem wherein a HDR content must be put into pixels in a buffer. At that moment, this infinite number of ways of representing it must be collapsed into a single set of pixel values in a buffer.

This chrome feature is for the 2D canvas version of the problem, but it may be helpful to peruse the related specifications of WebGPU texture upload and WebGL texture upload, since they are the same solution to the same problem (they are shipping as separate Chromium features, because their specs are separate and their development will be done in series).

Also of note is that a canvas can be a source of pixels (not just a destination) and there is a separate issue (and a separate feature) for dealing with that side of things.

Contact emails

ccam...@chromium.org

Explainer

https://github.com/ccameron-chromium/ColorWeb-CG/blob/master/canvas2d_hdr_headroom.md

Specification

None

Summary

Adds a global HDR headroom attribute to CanvasRenderingContext2D. When drawing HDR content (e.g, gain map images), to the canvas' bitmap, this attribute will determine how much tone mapping should be performed (if any).


Blink component

Blink>Canvas

Search tags

HDR tone mapping canvas drawImage

TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

None. This is designed to provide an avenue through which interoperability for HDR content can be increased, while maintaining backwards compatibility with existing behavior (because SDR is forever).



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

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



Goals for experimentation



Ongoing technical constraints

None



Debuggability

None



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

Yes

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

No

Flag name on about://flags

None

Finch feature name

CanvasGlobalHDRHeadroom

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/428575083

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5858435803119616

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages