Skip to main content

grab_frame

Function grab_frame 

Source
fn grab_frame(
    conn: &RustConnection,
    root: u32,
    surface: &ShmSurface,
    cap_x: i16,
    cap_y: i16,
    cap_w: u16,
    cap_h: u16,
) -> Result<(), String>
Expand description

One shm_get_image request is atomic — the server never interleaves another client inside it — so the grab is a coherent snapshot of whatever the screen held at that instant. Every grabbed frame is published; whether any of it changed is decided downstream by the encoder’s own per-stripe damage detection.