Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CanvasRenderingContext2D API Improvements #519

Open
mysteryDate opened this issue May 1, 2021 · 4 comments
Open

CanvasRenderingContext2D API Improvements #519

mysteryDate opened this issue May 1, 2021 · 4 comments
Assignees
Labels
topic: API venue: WHATWG Specifications in a WHATWG Workstream

Comments

@mysteryDate
Copy link

Other information

This proposal contains nine changes to the Canvas2D API. These changes are live in chromium behind the flag new-canvas-2d-api. We are looking to start origin trials as we have some collaborators who'd like to use the features.

@annevk
Copy link
Contributor

annevk commented May 10, 2021

@kdashg
Copy link

kdashg commented Jun 12, 2021

We generally are in favor of these for Firefox, but with the following reservations:

roundRect:
I'm not sure this quality-of-life improvement is much better than relying on a polyfill. More ways to do the same thing mean more ways for bugs to creep in. Instead, prefer to use the existing (well-tested) primitives unless we have something more compelling here. (e.g. rect() is more compelling than just lines and moves, because it's an optimization opportunity by communicating relations between the lines and moves. I'm not sure that roundRect has the same level of benefit)

4x4 transforms:
There are a bunch of implementation concerns here (and mentioned on that issue) with regards to availability on various native 2d backends. This might not be a problem for us (we are using skia, some webrender, and (for now) d2d), but it's concerning enough to push me towards splitting this one off from the others. Needs more investigation.

SVG filter interface:
We would really rather people use WebGL if you want fast/efficient filters. (I made a number of comments on that issue) As is, we're generally against this one for the time being. There may be certain filters that could be useful, but let's talk about each filter on its own, rather than signing up for a whole class of new functionality here.

@zcorpan
Copy link
Member

zcorpan commented Oct 18, 2024

@kdashg per your comment, it sounds like "positive" but with concerns with complexity?

@kdashg
Copy link

kdashg commented Dec 10, 2024

I believe we are variously:

  • Context loss: Positive
  • Conic gradient: Positive
  • willReadFrequently: Positive
  • CSSColor style input: Positive
  • reset(): Positive
  • CSS text modifiers: Positive
  • roundRect(): Neutral
  • 4x4 transforms: Negative
  • Improved SVG filter interface: Negative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: API venue: WHATWG Specifications in a WHATWG Workstream
Projects
Status: Position is proposed
Development

No branches or pull requests

4 participants