pub(crate) fn encode_shm_rows<T>(
buffer: &Buffer,
width: i32,
height: i32,
encode: impl FnOnce(&[u8]) -> Result<T, String>,
) -> Result<T, String>Expand description
Run encode on the rows of a client’s shm buffer a frame names (WlFrame::shm), height
rows of width pixels packed four bytes each: the pool’s mapping is valid only inside this
call, so the encode runs inside it. SHM_GONE where the pool was resized or destroyed under
the frame.