1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-09 21:52:10 -05:00
Ben Harris 19353dca85 GTK: faster rendering of X fonts under Cairo
Switching to server-side rendering of X fonts under Cairo turned out to
make text rendering much slower, at least on my laptop.  This appears to
be because PuTTY was asking the X server to render text into a
1-bit-per-pixel (bpp) pixmap before having Cairo composite into the
terminal surface.  On modern X servers 1bpp pixmaps are slow, being
largely un-accelerated.

Happily, it is possible to get Cairo to use an 8bpp pixmap instead, and
this is rather faster.  It's a bit inconvenient, though, because first
we have to confirm that that the X Rendering Extensions is present and
find the correct picture format.  That requires linking in libXrender,
which means a bit of CMake faff.  For now, I've make libXrender
mandatory (for X11 builds), but it and the corresponding Cairo functions
could be made optional fairly simply.

This hasn't actually made text rendering as much faster as I'd like on
my laptop.  While creating 1bpp pixmaps is nearly free, creating 8bpp
pixmaps takes significant time because they actually involve the GPU.
So I think now I need to rework my persistent-pixmap patch to work on
top of this one.
2025-05-06 23:59:52 +01:00
..