From 5ddddd91dfc949c96bca06d700d0b7eb980baec8 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 29 Jun 2025 18:01:40 +0200 Subject: [PATCH] graphics: Pass CursorPlane by shared ref to handle_cursor --- graphics/driver-graphics/src/lib.rs | 2 +- graphics/vesad/src/scheme.rs | 2 +- graphics/virtio-gpud/src/scheme.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphics/driver-graphics/src/lib.rs b/graphics/driver-graphics/src/lib.rs index 3ef5c0874e..09464cc083 100644 --- a/graphics/driver-graphics/src/lib.rs +++ b/graphics/driver-graphics/src/lib.rs @@ -22,7 +22,7 @@ pub trait GraphicsAdapter { fn supports_hw_cursor(&self) -> bool; fn create_cursor_framebuffer(&mut self) -> Self::Cursor; fn map_cursor_framebuffer(&mut self, cursor: &Self::Cursor) -> *mut u8; - fn handle_cursor(&mut self, cursor: &mut CursorPlane, dirty_fb: bool); + fn handle_cursor(&mut self, cursor: &CursorPlane, dirty_fb: bool); } pub trait Framebuffer { diff --git a/graphics/vesad/src/scheme.rs b/graphics/vesad/src/scheme.rs index f8c4249ee5..0c140e4767 100644 --- a/graphics/vesad/src/scheme.rs +++ b/graphics/vesad/src/scheme.rs @@ -55,7 +55,7 @@ impl GraphicsAdapter for FbAdapter { unimplemented!("Vesad does not support this function"); } - fn handle_cursor(&mut self, _cursor: &mut CursorPlane, _dirty_fb: bool) { + fn handle_cursor(&mut self, _cursor: &CursorPlane, _dirty_fb: bool) { unimplemented!("Vesad does not support this function"); } } diff --git a/graphics/virtio-gpud/src/scheme.rs b/graphics/virtio-gpud/src/scheme.rs index 86fc9c9fc9..1a908fbb68 100644 --- a/graphics/virtio-gpud/src/scheme.rs +++ b/graphics/virtio-gpud/src/scheme.rs @@ -331,7 +331,7 @@ impl GraphicsAdapter for VirtGpuAdapter<'_> { cursor.sgl.as_ptr() } - fn handle_cursor(&mut self, cursor: &mut CursorPlane, dirty_fb: bool) { + fn handle_cursor(&mut self, cursor: &CursorPlane, dirty_fb: bool) { if dirty_fb { self.update_cursor( &cursor.framebuffer,