[w3ctag/design-reviews] CanvasRenderingContext2D API Improvements (#627)

I'm requesting a TAG review of nine improvements to the CanvasRenderingContext2D API.  

Canvas is the web’s direct mode rendering solution that closely matches traditional programming models. This is particularly targeted for games and full featured apps. Modern 2D developers sometimes have to fallback to GL for features that are expected to be available in 2D but currently aren’t supported by Canvas 2D. There's a always a balance to be struck when adding new APIs to the web. That said, it's important that Canvas2D is able to address developer's use cases in game development and text manipulation.

The [current Canvas 2D API](https://html.spec.whatwg.org/multipage/canvas.html) 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:

1. feature parity with other 2D APIs;
2. access to current capabilities of the Web/CSS;
3. performance improvement.

  - Specification URL: [Spec to WHATWG is currently in progress](https://github.com/whatwg/html/issues/5613). Propsal repo: https://github.com/fserb/canvas2d

  - Tests:  
    - [Round Rect](https://github.com/web-platform-tests/wpt/tree/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/html/canvas/element/path-objects)
    - [Reset](https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/reset)
    - [Perspective Transforms](https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/transformations)
    - [Context Loss](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/fast/canvas/canvas-lost-gpu-context.html?q=f:web_tests%20canvas%20context%20lost&sq=package:chromium) (This is hard to test on wpt)
    - [Filters](https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/shadows)
    - [CSSColorValue input](https://chromium-review.googlesource.com/c/chromium/src/+/2794982) (WIP)
    - [WillReadFrequently](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/fast/canvas/OffscreenCanvas-2d-willReadFrequently.html?q=f:web_tests%20canvas%20willreadfrequently&sq=package:chromium) (WIP to add WPT tests)
    - [Conic Gradient](https://github.com/web-platform-tests/wpt/blob/master/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.html)
    - [Text Modifiers](https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/drawing-text-to-the-canvas)
  - Security and Privacy self-review²: Canvas2D is a potential target for fingerprinting. This is actively being studied internally at Google. These changes are on the front-end of the API and do not change font availability, winding, text rendering or compositing.
  - GitHub repo: https://github.com/fserb/canvas2d, WHATWG is probably the better place for feedback at this point in the process.
  - Primary contacts (and their relationship to the specification):
      - [Aaron Krajeski](github.com/mysteryDate), Chromium author/implementer
      - [Fernando Serboncini](github.com/fserb), Chromium author/implementer
  - Organization(s)/project(s) driving the specification: Chromium
  - Key pieces of existing multi-stakeholder review or discussion of this specification: See WHATWG issues.
  - External status/issue trackers for this specification (publicly visible, e.g. Chrome Status): 
    - [chromestatus](https://www.chromestatus.com/feature/6051647656558592), 
    - [crbug](crbug.com/1201359)

Further details:

  - [X] I have reviewed the TAG's [Web Platform Design Principles](https://w3ctag.github.io/design-principles/)
  - Relevant time constraints or deadlines: Trying to begin an origin trial in chrome for M92, which has a feature freeze on May 7.

We'd prefer the TAG provide feedback as:

  💬 leave review feedback as a **comment in this issue** and @-notify mysteryDate and fserb.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/627

Received on Tuesday, 27 April 2021 17:50:45 UTC