diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-04 13:02:05 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-04 13:02:22 +0300 |
| commit | 4618e4851ccac8b5d6e708ea926a25a1c22a3e27 (patch) | |
| tree | 8a001b72dc346b89e503ddc9910163bb3b14947f /src | |
| parent | b2ca280c49d7dc804fc76da6ec9f7f1cbe8f9de5 (diff) | |
| download | niri-4618e4851ccac8b5d6e708ea926a25a1c22a3e27.tar.gz niri-4618e4851ccac8b5d6e708ea926a25a1c22a3e27.tar.bz2 niri-4618e4851ccac8b5d6e708ea926a25a1c22a3e27.zip | |
Default to unrestricted primary plane scanout
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/tty.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs index 67f99bbc..bf94ed12 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -1336,21 +1336,29 @@ impl Tty { // Overlay planes are disabled by default as they cause weird performance issues on my // system. - let mut flags = - FrameFlags::ALLOW_PRIMARY_PLANE_SCANOUT | FrameFlags::ALLOW_CURSOR_PLANE_SCANOUT; - { + let flags = { let debug = &self.config.borrow().debug; + + let primary_scanout_flag = if debug.restrict_primary_scanout_to_matching_format { + FrameFlags::ALLOW_PRIMARY_PLANE_SCANOUT + } else { + FrameFlags::ALLOW_PRIMARY_PLANE_SCANOUT_ANY + }; + let mut flags = primary_scanout_flag | FrameFlags::ALLOW_CURSOR_PLANE_SCANOUT; + if debug.enable_overlay_planes { flags.insert(FrameFlags::ALLOW_OVERLAY_PLANE_SCANOUT); } if debug.disable_direct_scanout { - flags.remove(FrameFlags::ALLOW_PRIMARY_PLANE_SCANOUT); + flags.remove(primary_scanout_flag); flags.remove(FrameFlags::ALLOW_OVERLAY_PLANE_SCANOUT); } if debug.disable_cursor_plane { flags.remove(FrameFlags::ALLOW_CURSOR_PLANE_SCANOUT); } - } + + flags + }; // Hand them over to the DRM. let drm_compositor = &mut surface.compositor; |
