pub struct DisplayParams {
pub src_rect: Rect,
pub src_rect_fixed: Option<FixedRect>,
pub dst_rect: Rect,
pub rotation: u64,
pub alpha: Option<u16>,
pub zpos: Option<u64>,
pub color_primaries: Option<ColorPrimaries>,
pub source_eotf: Option<TransferFunction>,
pub color_encoding: Option<ColorEncoding>,
pub color_range: Option<ColorRange>,
}Expand description
How a layer should be displayed.
Fields§
§src_rect: RectRegion of the buffer to show.
A zero width or height means “the buffer’s full extent” — see
lower_layer, where that resolution happens.
src_rect_fixed: Option<FixedRect>The source crop at sub-pixel precision.
When set it takes precedence over src_rect and is
written to SRC_X/Y/W/H as given; a zero width or height still
means the buffer’s full extent. The composition fallback, which
samples whole pixels, rounds it. None: src_rect applies.
dst_rect: RectRegion of the CRTC to show it on.
x/y are signed: a plane may extend off-screen.
rotation: u64Rotate and reflect bits, as a DRM_MODE_ROTATE_* /
DRM_MODE_REFLECT_* mask. Zero means no rotation, and nothing is
written.
alpha: Option<u16>Per-plane alpha, if the caller set one.
zpos: Option<u64>Stacking position, if the caller set one.
Left unset deliberately by most callers — see
lower_layer for why writing a default here
rather than leaving it alone is actively harmful.
color_primaries: Option<ColorPrimaries>The container colorimetry this layer’s content is in.
Feeds the scene’s choice of connector Colorspace – the widest-gamut
layer wins – and seeds the mastering primaries when the frame is HDR.
None means the producer did not say, and the scene leaves the
connector property alone rather than guessing.
source_eotf: Option<TransferFunction>The transfer function the content is encoded with.
None is the SDR transfer. When any layer in a frame reports PQ or
HLG the scene declares HDR on the connector.
color_encoding: Option<ColorEncoding>The YCbCr-to-RGB matrix this layer’s pixels were encoded with: the
plane’s COLOR_ENCODING.
None asks for BT.709. Only YUV formats are converted, so an RGB
layer is unaffected either way; the scene still writes the value, to
displace whatever the previous client left on the plane. A plane
without the encoding asked for gets BT.709, or BT.601 where that is
all it has.
color_range: Option<ColorRange>Whether this layer’s YCbCr is limited or full range: the plane’s
COLOR_RANGE. None asks for limited, which most camera and
broadcast video is.