-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add ImageBitmap and related APIs #1707
Conversation
The impression I get here, and the caveat is I don't this part of the platform well, is that this is more of a reference for the ImageBitmap interface than a developer feature. We need to think of this in terms of what devs would do with it. Are they likely to do |
@captainbrosset thanks for the feedback. The high level developer need which the these APIs meet seems mostly around performant/ergonomic transformation/transfer of content. Image processing, images as sprites, performant duplication/patterns, texture generation, and capturing/moving/modifying frames for anything video/animation. Example: Say I want to grab some frames from a currently playing video and manipulate them, and/or stash them, then later push to a canvas collage to use as a preview image or whatever. There's loads of examples of how much fun... er, useful, this is. The later addition of a global function to create ImageBitmap maybe seems to speak to this being something to file under "Image Processing" or something like that? From a granularity perspective though, Image Processing seems more like a group than a feature, where ImageBitmap and friends seem more like a feature. WDYT? |
@captainbrosset prompted a conversation on feature composition at the biweekly meeting, which was great! There was no conclusion, but general agreement that the boundaries of a feature are not clear. Until we get there, I'll instead provide explicit rationale, so that the thinking behind the proposal of a given feature is clear. Perhaps out of this practice, useful criteria may emerge. Maybe we need a concept of a "feature thesis"? 🤔 So in the spirit of EIBTI, writing out the thought process I went through when proposing this as a standalone feature:
Very much open to better ideas, this just seemed sufficient in my first look. I'm sure we'll come across more "glue" features when breaking up the mega-specs, so more conversation is better since it'll inform those future decisions. |
Another option could be to do something around Drawback is that's not really how it is referred to, from what I can see. But feature naming/composition (esp in newer ones) is a balance of status quo and what might make a feature more discoverable/usable. |
We discussed in person last week and there were two conclusion-ish things that the assembled group agreed on:
On the former point, we are still not left with a clear path. Eg API X exists only as way for Feature Y and Z to interact bidirectionally. Does it belong to Feature Y or to Z? 🤷🏽 The latter point is helpful in this particular case, and in our conversation we concluded @ddbeck feel free to provide more colour or corrections as needed! |
OK, forgive me because I don't think I made my point last week very clearly. On the matter of constructors: The existence of a global constructor strongly implies that there exists a feature, though the interface itself might not be a feature. For example, the So my "theory" about interstitial APIs is that they probably came into existence for some concrete feature, then other features co-opted or glommed onto that interface. I have yet to see a counter example yet, though I would be interested to be proven wrong. So, my chief question is: what was the first API to use an |
Probably
Happy to put this in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I dug into this better today. I read the documentation and some specs more closely and trolled through some spec history.
I got my wires crossed and thought this was some sort API interchange type with spotty support, but clearly it's not—it's providing a specific thing back onto canvas, so it doesn't make sense as some kind of later addition. It's its own thing.
I will now be going back on my previous review. 😅
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending a file rename.
First take at splitting features out of html, lmk if there's any group we want for that high level.