Updated Canvas 2D API
- Category
- Graphics
- Type
- Chromium catches up
- Status
- No active development (Chrome No active development)
- Intent stage
- Start prototyping
Summary
We are expanding and modernizing some part of Canvas 2D API, including: - Canvas context loss: allow canvas to be discarded and re-drawn by demand. - willReadFrequently. context creation attribute - Array color input. - CSS Text modifiers. - reset() function - RoundRect - Perspective transforms. - Conic Gradient. - Modern filters
Motivation
The current Canvas 2D API was originally proposed in 2013. Since then, a lot of 2D graphics APIs have appeared and changed what developers expect from a good 2D API. This proposal tries to modernize Canvas 2D API, considering current and future usage of Canvas and considering 3 pillars: feature parity with other 2D APIs; access to current capabilities of the Web/CSS; performance improvement.
Standards & signals
- Specification: https://github.com/fserb/canvas2D/
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1152462
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=updated-canvas-2d-api
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Updated%20Canvas%202D%20API
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Updated%20Canvas%202D%20API
- Baseline status: https://webstatus.dev/?q=Updated%20Canvas%202D%20API
Explainers: https://github.com/fserb/canvas2D/