graphics: Pass CursorPlane by shared ref to handle_cursor
This commit is contained in:
@@ -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<Self::Cursor>, dirty_fb: bool);
|
||||
fn handle_cursor(&mut self, cursor: &CursorPlane<Self::Cursor>, dirty_fb: bool);
|
||||
}
|
||||
|
||||
pub trait Framebuffer {
|
||||
|
||||
@@ -55,7 +55,7 @@ impl GraphicsAdapter for FbAdapter {
|
||||
unimplemented!("Vesad does not support this function");
|
||||
}
|
||||
|
||||
fn handle_cursor(&mut self, _cursor: &mut CursorPlane<VesadCursor>, _dirty_fb: bool) {
|
||||
fn handle_cursor(&mut self, _cursor: &CursorPlane<VesadCursor>, _dirty_fb: bool) {
|
||||
unimplemented!("Vesad does not support this function");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ impl GraphicsAdapter for VirtGpuAdapter<'_> {
|
||||
cursor.sgl.as_ptr()
|
||||
}
|
||||
|
||||
fn handle_cursor(&mut self, cursor: &mut CursorPlane<VirtGpuCursor>, dirty_fb: bool) {
|
||||
fn handle_cursor(&mut self, cursor: &CursorPlane<VirtGpuCursor>, dirty_fb: bool) {
|
||||
if dirty_fb {
|
||||
self.update_cursor(
|
||||
&cursor.framebuffer,
|
||||
|
||||
Reference in New Issue
Block a user