Intent to Prototype: getContextAttributes for OffscreenCanvasRenderingContext2D

21 views
Skip to first unread message

Christopher Cameron

unread,
Jan 8, 2025, 8:53:15 AM (yesterday) Jan 8
to blink-dev, Dominic Farolino
Contact emails
ccam...@chromium.org

Explainer
https://github.com/ccameron-chromium/ColorWeb-CG/blob/canvas_cleanup/canvas2d_settings.md

Specification PR
https://github.com/whatwg/html/pull/10904

Summary
There is a lot of duplicated spec text for CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D, especially related to how CanvasRenderingContext2DSettings is handled. As with all things that are duplicated, there are accidental divergences.

This removes these accidental divergences, adding the getContextAttributes method to OffscreenCanvasRenderingContext2D in the process.

Blink component
Blink>Canvas

Motivation
This is prerequisite work for adding floating point and HDR canvas support (it would not be responsible to add more fields in this area without doing some cleanup first)

TAG review
https://github.com/w3ctag/design-reviews/issues/1036

TAG review status
Pending

Risks

Interoperability and Compatibility
Gecko: https://github.com/mozilla/standards-positions/issues/1159
WebKit: https://github.com/WebKit/standards-positions/issues/445
Web developers: No signals

WebView application risks
None

Debuggability
None

Is this feature fully tested by web-platform-tests?
In development (along with the feature)

Flag name
None yet, will be OffscreenCanvasGetContextAttributes

Requires code in //chrome?
False

Tracking bug
https://crbug.com/388437261

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5508068999430144

Stephen Chenney

unread,
Jan 8, 2025, 9:30:20 AM (yesterday) Jan 8
to Christopher Cameron, blink-dev, Dominic Farolino
+1

I'm in this space a lot now and cleaning up canvas spec seems to be something everyone agrees is a good thing.

Stephen.

--
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 visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnfxj_NMVg9vW0gsRhJ_rPW%3Dhb4C_UKPNd1LXdsUrRhebKj4Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages