Skip to main content

resolve_region

Function resolve_region 

Source
fn resolve_region(
    screen: NVFBC_SIZE,
    s: &CaptureSettings,
) -> (NVFBC_BOX, NVFBC_SIZE)
Expand description

The capture region and delivered frame size for a set of settings against a framebuffer of screen, in the terms the XShm path resolves them: the origin clamped into the screen, the size following the root when auto-adjust is on and clamped to what is left of it otherwise, and both dimensions even because every video codec needs them to be.

A zero-sized box means the whole tracked region, so a capture that covers the screen asks for it that way and keeps following a resize.