pub struct PlanePropertyMap { /* private fields */ }Expand description
Resolves a layer’s PropTags to the DRM property ids of a given plane.
Property ids are per-object and stable for a device’s lifetime, so they are resolved once per plane and cached. Doing it per frame would be an ioctl per property per layer.
Implementations§
Source§impl PlanePropertyMap
impl PlanePropertyMap
Sourcepub fn learn_all(
&mut self,
device: &Device,
registry: &PlaneRegistry,
) -> Result<(), CoreError>
pub fn learn_all( &mut self, device: &Device, registry: &PlaneRegistry, ) -> Result<(), CoreError>
Sourcepub fn note_color_committed(&mut self, plane_id: u32, color: Option<Ycbcr>)
pub fn note_color_committed(&mut self, plane_id: u32, color: Option<Ycbcr>)
Record that a real commit carried a plan entry’s colorimetry.
Call for every entry of a frame the kernel accepted. A TEST_ONLY
applies nothing, so noting one would suppress the write on the commit
that actually matters and leave the plane on the previous client’s
settings. An entry that asks for nothing – the composition canvas –
leaves the record as it was.
Sourcepub fn property_id(&self, plane_id: u32, tag: PropTag) -> Option<u32>
pub fn property_id(&self, plane_id: u32, tag: PropTag) -> Option<u32>
The DRM property id for a tag on a plane, if it is writable there.
Sourcepub fn is_immutable(&self, plane_id: u32, tag: PropTag) -> bool
pub fn is_immutable(&self, plane_id: u32, tag: PropTag) -> bool
Whether the plane marks this property immutable.
Source§impl PlanePropertyMap
impl PlanePropertyMap
Sourcepub fn rescale_alpha(&self, plane_id: u32, value: u64) -> u64
pub fn rescale_alpha(&self, plane_id: u32, value: u64) -> u64
A layer’s 16-bit alpha, on the scale this plane advertises.
Every write of a layer’s properties goes through
emit_layer, so this one call covers the allocator’s tests, the real
commit and a pinned layer alike – upstream needed two fixes to reach
all three.
Sourcepub fn clamp_zpos(&self, plane_id: u32, value: u64) -> u64
pub fn clamp_zpos(&self, plane_id: u32, value: u64) -> u64
Bring a derived zpos inside what the plane will actually take.
Only zpos is clamped, and only against an unsigned range. Every other plane property carries a value the caller measured or was handed – a rectangle, a framebuffer id – where a value outside the range is a real error that silently moving would hide. zpos alone is computed, so it alone is worth bending to fit; a canvas one slot lower than asked is still above every layer, whereas the alternative is no frame at all.