2026-08-09 10:17 UTC
@paniash@mas.to Yes. The idea is: how to draw into Emacs without having the bottleneck of having to convert your image data into a string and then give it to Emacs.
With Canvas, we have a pixel buffer (in the sense of a memory buffer) provided by the Module API. So it's like you get low-level access to the image, so that you can get your pixel data manipulated and updated at the lower level and Emacs refreshes it in an instant!
You can also use canvas in pure Elisp (like in the demo), it's not _as efficient_ in terms of memory but it's more efficient than existing image types in terms of redisplaying/refreshing. This is thanks to @minad@mastodon.world being diligent in optimizing the redraw path of canvases.
TLDR: Yes, and this allows us to have real-time graphics at high frame rates for stuff such as video playing, games, etc.
Replies (1)
-
@paniash@mas.to 2026-08-09 10:32
@divyaranjan@mathstodon.xyz @minad@mastodon.world Thanks for the detailed explanation! Very exciting. :)