Intent to Prototype: Canvas Floating Point Color Types

71 views
Skip to first unread message

Christopher Cameron

unread,
Nov 17, 2022, 5:30:55 AM11/17/22
to blink-dev

Contact emails

ccam...@chromium.org

Explainer

https://github.com/w3c/ColorWeb-CG/blob/master/canvas_float.md

Summary

Introduce the ability to create high-precision, extended-range content using CanvasRenderingContext2D, OffscreenCanvasRenderingContext2D, and ImageData using floating-point color types.


Blink component

Blink>Canvas

Motivation

Floating-point pixel values are the natural representation of pixel data, and allow such features as representing colors in arbitrarily wide gamuts and high dynamic range. Current 2D canvases are limited to representing pixels using 8-bit unsigned integers, for historical reasons. All other canvas rendering APIs either have floating-point pixel support (WebGPU) or have a widely supported proposal (WebGL). This brings 2D canvas rendering in line with the capabilities of all other APIs. This is also a prerequisite for enabling 2D canvas rendering to create HDR content. This was split off from the HTMLCanvasElement HDR Proposal, because it is an independent dependency of that proposal, and is valuable on its own.


TAG review status:

Needs review


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

Not yet!


Flag name:

CanvasFloatingPoint


Requires code in //chrome?

No


Tracking bug

https://crbug.com/1382422

Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5086141338877952

Rick Byers

unread,
Nov 17, 2022, 10:07:31 AM11/17/22
to Christopher Cameron, blink-dev, fs...@chromium.org
Makes sense, thanks for the heads up!

I assume you're already or will be working with the Canvas team (+fserb) to review patches etc.

Rick

--
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/CAGnfxj_7FCH9mmGGB3Q3ZKJqP1EamLGUpOzjSpZYHXVkVOWW_w%40mail.gmail.com.

Fernando Serboncini

unread,
Nov 17, 2022, 1:25:04 PM11/17/22
to Rick Byers, Christopher Cameron, blink-dev
Yeah, yeah. We are working together on it. ;)

Rick Byers

unread,
Nov 17, 2022, 1:26:57 PM11/17/22
to Fernando Serboncini, Christopher Cameron, blink-dev
Thanks, figured :-).
Reply all
Reply to author
Forward
0 new messages