I have implemented a new version of the Emacs canvas patch. Refreshing avoids redrawing or even checking the entire buffer. Only the single glyph where the canvas is attached as display property is redrawn.

I welcome help with testing or porting to other platforms than Cairo/Pgtk or X. @divyaranjan ported his Pale library to the new version of the canvas API, with good results.

Canvas patch and test program:
https://github.com/minad/emacs-canvas-patch

Discussion on the bug tracker:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=80281

GitHub - minad/emacs-canvas-patch

Contribute to minad/emacs-canvas-patch development by creating an account on GitHub.

GitHub
@minad @divyaranjan What's the main project link? This looks interesting
GNU Emacs - GNU Project

@benleis @divyaranjan
But maybe you're looking for Pale instead?

https://codeberg.org/MonadicSheep/pale

pale

Picture and Animation Library for Emacs

Codeberg.org
@minad @divyaranjan
No I thought it was a separate package rather than built into the emacs main code.
@benleis @minad Yeah so we have a small patch which enables this sort of thing and then we build on top of it.