diff --git a/local/recipes/wayland/redbear-compositor/source/src/main.rs b/local/recipes/wayland/redbear-compositor/source/src/main.rs index 218089409..472d8ac7c 100644 --- a/local/recipes/wayland/redbear-compositor/source/src/main.rs +++ b/local/recipes/wayland/redbear-compositor/source/src/main.rs @@ -1096,6 +1096,10 @@ impl Compositor { } fn composite_buffer(&self, pool: &mut ShmPool, buffer: &Buffer, surface: &Surface) { + // The compositor is single-threaded (handle_client is blocking). + // Mutex guards are used only for Rust borrow-safety; raw pointers + // obtained from Vec::as_mut_ptr() remain valid after the guard is + // dropped because no other thread can mutate the buffers. let byte_count = buffer.height as usize * buffer.stride as usize; if buffer.offset as usize + byte_count > pool.size { return; }