wayland: Add single pixel buffer support

The "single pixel buffer" Wayland protocol extension provides a way for
clients to create 1x1 buffers with a single color, specified by
providing the color channels (red, green and blue) as well as the
alpha channel as a 32 bit unsigned integer.

For now, this is turned into a 1x1 texture. Future potential
improvements is to hook things up to the scanout candidate logic and
turn it into a scanout capable DMA buffer.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2246>
This commit is contained in:
Jonas Ådahl
2022-01-19 11:49:32 +01:00
committed by Marge Bot
parent 823e3a5c72
commit 2cb7499735
8 changed files with 255 additions and 2 deletions

View File

@ -627,6 +627,7 @@ meta_wayland_compositor_new (MetaContext *context)
meta_wayland_pointer_constraints_init (compositor);
meta_wayland_xdg_foreign_init (compositor);
init_dma_buf_support (compositor);
meta_wayland_init_single_pixel_buffer_manager (compositor);
meta_wayland_keyboard_shortcuts_inhibit_init (compositor);
meta_wayland_surface_inhibit_shortcuts_dialog_init ();
meta_wayland_text_input_init (compositor);