-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Define ImageBitmapSource in terms of CanvasImageSource #893
Comments
@junov do you know why CanvasImageSource does not include Blob or ImageData? |
I don't know, but my guess would be lack demand and the existence of reasonable workarounds. Also the workarounds perform well. I kinda like the idea of not allowing drawImage(Blob,...). It encourages devs to go through ImageBitmap, which has better performance characteristics due to it's asynchronous mode of operation. On browsers that do not have ImageBitmap, you would use an intermediate Similarly, if you want to do the equivalent of drawImage(ImageData, ...) with today's APIs, you would have to use an intermediate canvas, use putImageData on it, and do a canvas-to-canvas draw. The intermediate canvas allows the image data to be stored in a native internal format (e.g. pre-multiplied by alpha, possibly on the GPU), which will yield higher performance for repetitive draws of the same image data. |
Yeah that makes sense. I take it you have no objections to defining it in terms of |
Sure, that makes sense. |
Hmm I just noticed |
Oh yeah, that should not be there. |
I'll try to clean that up. |
Thanks. |
It seems CanvasImageSource is a subset.
Anyone happen to know why CanvasImageSource does not take Blob or ImageData?
The text was updated successfully, but these errors were encountered: