Skip to main content

negotiate

Function negotiate 

Source
pub fn negotiate(
    formats: &[(TextureFormat, SurfaceColorSpaces)],
    allow_hdr: bool,
    peak_nits: Option<f32>,
) -> Option<Output>
Expand description

Picks the output for a surface offering formats (format, color spaces), in order of preference: PQ on a 10-bit format, scRGB, PQ on fp16, then SDR (an *Srgb format first). allow_hdr = false forces SDR. Returns None only if no format is usable at all.