3 ms·
But you can do this now with Canvas.toDataURL(). Do we need to support another drawing surface API?
by hyperhello 1y ago
But you can do this now with Canvas.toDataURL(). Do we need to support another drawing surface API?
- 90s_dev 1y agoUsing toDataURL() has a lot of overhead that this doesn't use. Also this runs in worklets.
- Seb-C 1y agoBlob URLs should work without much overhead.
- esprehn 1y agoThat won't handle resizing properly. This API lets you hook directly into the painting phase of rendering in the browser so you can both draw the correct size without forcing layout and handle resizing. It also gives the browser the flexibility to not paint the off screen content at all.