-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
suggestion: refactor canvas
features
#1454
Comments
I agree we should have features for each kind of context. We already have
I'm suggesting no One thing I'm not sure about is whether we should have a feature for the Then there's the question of the existing smaller canvas features, like Canvas reset(). These follow a common pattern of platform evolution:
The challenge here is that when a new things like Hope that helps! I would suggest starting by adding the new contexts to get lots and lots of BCD keys out of the way. It'll be easier to understand the remainder after that. |
Starting the work for the 2d context in #1500.
I think it's more clear when we do add it and adds some future proofing. For example, WebGPU may in the future have APIs for AI and APIs for drawing, and keeping those separate creates a clear differentiation. I also think it'll help for the smaller features issue mentioned below.
I agree separate is better.
After just giving a quick start on #1500, I think we're going to have to have separate entries for a significant number of these. But that potentially will lead to a large number of individual features/files, and some complexity on the file name. For example, |
There are a handful of canvas features that are already done (canvas-context-lost, canvas-createconicalgradient, canvas-reset, etc). All of these include both the general Canvas 2D context, and the Offscreen Canvas context.
I suggest we refactor these into two features,
canvas-2d
, andcanvas-offscreen
, then include all the APIs for that context in a single web feature. Similarly, we'd also havecanvas-webgl
,canvas-webgl2
, andcanvas-webgpu
.Any objections or feedback before I proceed?
The text was updated successfully, but these errors were encountered: