Skip to content

Commit

Permalink
drm/output: Provide a way to lock the device for custom needs
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Dec 4, 2024
1 parent a465b68 commit 5bb1886
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backend/drm/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ where
}
}

pub fn with_compositors<R>(
&mut self,
f: impl FnOnce(&HashMap<crtc::Handle, Mutex<DrmCompositor<A, F, U, G>>>) -> R,
) -> R {
let write_guard = self.compositor.write().unwrap();
f(&*write_guard)
}

pub fn reset_format<R, E, RE>(
&mut self,
renderer: &mut R,
Expand Down

0 comments on commit 5bb1886

Please sign in to comment.