From 3c96d0b68e3f3d270e885c4d7bb82ae8667ba385 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 21 May 2024 16:09:34 +0200 Subject: render: use single-pixel buffers for overlays, when possible The unicode-mode, and flash overlays are single color buffers. This means we can use the single-pixel buffer protocol. It's undefined whether the compositor will release the buffer or not; to make things easier, simply destroy the buffer as soon as we've committed it. Note that since compositors don't necessarily release single-pixel buffers, we can't plug them into our own buffer interface. This means we can't use buffer pointers to check if we can re-use the previous buffer (i.e. we can skip comitting a new buffer), or if we have to create a new one. It's _almost_ enough to just check if the last overlay style is the same as the current one. Except that that doesn't take window resizes into account... --- meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index dd698557..7c714ddf 100644 --- a/meson.build +++ b/meson.build @@ -159,6 +159,7 @@ wl_proto_xml = [ wayland_protocols_datadir / 'staging/fractional-scale/fractional-scale-v1.xml', wayland_protocols_datadir / 'unstable/tablet/tablet-unstable-v2.xml', # required by cursor-shape-v1 wayland_protocols_datadir / 'staging/cursor-shape/cursor-shape-v1.xml', + wayland_protocols_datadir / 'staging/single-pixel-buffer/single-pixel-buffer-v1.xml', ] foreach prot : wl_proto_xml -- cgit v1.3