compositor-view/native: Add debug flag to force-disable direct scanout

In order to make it easier to test composited paths.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3949>
This commit is contained in:
Robert Mader 2024-08-13 21:08:23 +02:00
parent 4ea693bc20
commit bb55a1e83a
2 changed files with 5 additions and 0 deletions

View File

@ -163,6 +163,9 @@ find_scanout_candidate (MetaCompositorView *compositor_view,
ClutterColorState *surface_color_state;
MetaWaylandSurface *surface;
if (meta_get_debug_paint_flags () & META_DEBUG_PAINT_DISABLE_DIRECT_SCANOUT)
return FALSE;
if (meta_compositor_is_unredirect_inhibited (compositor))
{
meta_topic (META_DEBUG_RENDER,

View File

@ -53,12 +53,14 @@ void meta_fatal (const char *format,
* @META_DEBUG_PAINT_OPAQUE_REGION: paint opaque regions
* @META_DEBUG_PAINT_SYNC_CURSOR_PRIMARY: make cursor updates await compositing
* frames
* @META_DEBUG_PAINT_DISABLE_DIRECT_SCANOUT: always composite frames
*/
typedef enum
{
META_DEBUG_PAINT_NONE = 0,
META_DEBUG_PAINT_OPAQUE_REGION = 1 << 0,
META_DEBUG_PAINT_SYNC_CURSOR_PRIMARY = 1 << 1,
META_DEBUG_PAINT_DISABLE_DIRECT_SCANOUT = 1 << 2,
} MetaDebugPaintFlag;
META_EXPORT