mirror of
https://github.com/brl/mutter.git
synced 2025-01-24 02:19:15 +00:00
8a0d0ce987
This avoids having to hardcode the same fallbacks elsewhere multiple times when determining what formats might be suitable for a set of CRTCs. The formats_modifiers hash table is now guaranteed to be populated with at least something, so future code will not need to handle it being empty. The hardcoded fallback formats are a minimal set probably supported by most hardware. XRGB8888 is the format that, according to ancient lore, all DRM devices should support, especially if they don't have the capability to advertise otherwise. Mutter also hardcodes XRGB8888 as the GBM surface format, so it is already required on primary GPUs. XBGR8888 matches the most common OpenGL format, sans alpha channel since scanout hardware has not traditionally supported alpha. XBGR8888 is here also because Mutter hardcodes that format for secondary GPU outputs when using the CPU copy path. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341