Handle dmabuf blocker separately in toplevel pre-commit

Will be needed for transactions.
This commit is contained in:
Ivan Molodetskikh
2024-08-18 12:42:50 +03:00
parent f1894f6f9a
commit a40e7b4470
3 changed files with 107 additions and 43 deletions
+6 -2
View File
@@ -67,8 +67,8 @@ use smithay::utils::{
Transform, SERIAL_COUNTER,
};
use smithay::wayland::compositor::{
with_states, with_surface_tree_downward, CompositorClientState, CompositorState, SurfaceData,
TraversalAction,
with_states, with_surface_tree_downward, CompositorClientState, CompositorState, HookId,
SurfaceData, TraversalAction,
};
use smithay::wayland::cursor_shape::CursorShapeManagerState;
use smithay::wayland::dmabuf::DmabufState;
@@ -189,6 +189,9 @@ pub struct Niri {
// normal get_parent() is cleared out.
pub root_surface: HashMap<WlSurface, WlSurface>,
// Dmabuf readiness pre-commit hook for a surface.
pub dmabuf_pre_commit_hook: HashMap<WlSurface, HookId>,
pub output_state: HashMap<Output, OutputState>,
pub output_by_name: HashMap<String, Output>,
@@ -1732,6 +1735,7 @@ impl Niri {
output_by_name: HashMap::new(),
unmapped_windows: HashMap::new(),
root_surface: HashMap::new(),
dmabuf_pre_commit_hook: HashMap::new(),
monitors_active: true,
devices: HashSet::new(),