Intent to Ship: OffscreenCanvas getContextAttributes

89 views
Skip to first unread message

ccameron chromium

unread,
Jan 21, 2025, 6:09:45 AM1/21/25
to blink-dev
Contact emails
ccam...@chromium.org

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

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

Summary
Add the getContextAttributes interface from CanvasRenderingContext2D to OffscreenCanvasRenderingContext2D. Its omission from CanvasRenderingContext2D was accidental.

Add support for willReadFrequently and desynchronized to OffscreenCanvasRenderingContext2D in the HTML spec. The spec changes for those features were intended to apply both to CanvasRenderingContext2D and to OffscreenCanvasRenderingContext2D. Blink has already shipped support for these.

Clean up the text of the spec to avoid these sorts of mistakes in the future, and to streamline future changes.

Blink component
Blink>Canvas

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

TAG review status
Pending

Risks

Interoperability and Compatibility
None

Gecko: No signal (https://github.com/mozilla/standards-positions/issues/1159)

WebKit: No official signal yet, informal positive (https://github.com/WebKit/standards-positions/issues/445)

Web developers: No signals, but does align the spec with longstanding feature requests (e.g, https://github.com/whatwg/html/issues/2659)

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

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?
Yes, pending https://chromium-review.googlesource.com/c/chromium/src/+/6157844

Flag name on about://flags
None

Finch feature name
OffscreenCanvasGetContextAttributes

Non-finch justification
N/A

Requires code in //chrome?
False

Tracking bug
https://crbug.com/388437261

Estimated milestones
No milestones specified

Anticipated spec changes
The altered spec text will be further modified soon to add support for float16 canvas and HDR canvas. Adding new features without cleaning this up would have been irresponsible.

Yoav Weiss (@Shopify)

unread,
Jan 22, 2025, 9:58:46 AM1/22/25
to blink-dev, ccameron chromium
LGTM1

Daniel Bratell

unread,
Jan 22, 2025, 10:35:17 AM1/22/25
to Yoav Weiss (@Shopify), blink-dev, ccameron chromium

LGTM2

/Daniel

--
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/42871ac6-4e5b-4183-a7d4-7b20f10e9219n%40chromium.org.

Vladimir Levin

unread,
Jan 22, 2025, 10:57:39 AM1/22/25
to blink-dev, Daniel Bratell, ccameron chromium, Yoav Weiss
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages