From 341737877dbd7169ba408171d6322c85c9a24bab Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 4 Dec 2024 17:26:25 +0100 Subject: [PATCH] drm/output: Also allow to set the mode from the manager --- src/backend/drm/output.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/backend/drm/output.rs b/src/backend/drm/output.rs index 5a3c3bfe2ef8..4d6384f58d95 100644 --- a/src/backend/drm/output.rs +++ b/src/backend/drm/output.rs @@ -175,6 +175,21 @@ where f(&*write_guard) } + pub fn use_mode(&mut self, crtc: crtc::Handle) -> DrmModeSwitcher + where + E: RenderElement, + R: Renderer + Bind, + ::TextureId: Texture + 'static, + ::Error: Send + Sync + 'static, + { + DrmModeSwitcher { + compositor: self.compositor.clone(), + crtc: crtc, + render_elements: HashMap::new(), + _renderer: PhantomData, + } + } + pub fn reset_format( &mut self, renderer: &mut R,