diff --git a/drivers/graphics/graphics-ipc/src/lib.rs b/drivers/graphics/graphics-ipc/src/lib.rs index 5c24df1d0f..285b304372 100644 --- a/drivers/graphics/graphics-ipc/src/lib.rs +++ b/drivers/graphics/graphics-ipc/src/lib.rs @@ -82,6 +82,10 @@ impl CpuBackedBuffer { &self.buffer } + pub fn has_shadow_buf(&self) -> bool { + self.shadow.is_some() + } + pub fn shadow_buf(&mut self) -> &mut [u8] { self.shadow.as_deref_mut().unwrap_or(&mut *self.map) }