On Sun, May 17, 2020 at 11:30 AM Julius Pfrommer <julius.pfrommer@web.de> wrote:
A first step could be to assume Cairo on X-based platforms and remove
duplicate code. The second step could be to decouple the "glass" from
the tookit "chrome" more thoroughly in xterm.c. That is easier to do
when a Cairo-canvas can be assumed for drawing.

Then, that entire "glass" could be reused by other platforms once they
have a Cairo-canvas for drawing as well. (Modulo the XWidget support
that depends on GTK.)

FWIW, there exists code to bring xwidgets and webkit into macOS without GTK:
  https://github.com/veshboo/emacs
I haven't tried it since my macOS machine died ~1.5 years ago, but it worked once upon a time.