Headless native backend and virtual monitors
This merge requests adds three notable things:
- Ability to run the native backend on top of only a render node (i.e. no mode setting) and without evdev (a.k.a. "headless")
- Ability to create virtual monitors via command line arguments, primarily for debugging purposes
- Ability to create virtual monitors PipeWire streams via a new
org.gnome.Mutter.ScreenCast.Session.RecordVirtual
D-Bus method.
Virtual monitors are not tied to the headless backend, but the only way to use the headless backend is by creating virtual monitors, which is why this merge requests introduces both.
An easy way to test is using the added command line arguments. To run mutter with two virtual monitors, one can run:
mutter --wayland --headless --virtual-monitor 1280x720 --virtual-monitor 1280x720
Both of these monitors can this way e.g. be screen casted via the existing RecordMonitor
or RecordArea
screen casting APIs.
I have added various tests that runs the headless backend, but sadly, they cannot be run as part of CI yet, until Infrastructure/GitLab#470 (closed) is fixed. These tests include "ref tests", which mantains a set of reference test images (as in repository PNG files), and aim to test that virtual monitors behave correctly.
These reference tests can eventually be expanded to test many other parts, including also the added currently very basic screen cast test client.
This merge request is currently marked as "Draft" as it includes !1697 (merged) and !1688 (merged).