pub struct SceneLayer { /* private fields */ }Expand description
A layer’s live scene state.
Implementations§
Source§impl SceneLayer
impl SceneLayer
Sourcepub fn source(&self) -> &dyn LayerBufferSource
pub fn source(&self) -> &dyn LayerBufferSource
The buffer source. The scene keeps ownership.
Sourcepub fn source_mut(&mut self) -> &mut dyn LayerBufferSource
pub fn source_mut(&mut self) -> &mut dyn LayerBufferSource
The buffer source, mutably — for painting into it, not for replacing it.
Sourcepub const fn display(&self) -> &DisplayParams
pub const fn display(&self) -> &DisplayParams
How this layer is displayed.
Sourcepub const fn set_display(&mut self, display: DisplayParams)
pub const fn set_display(&mut self, display: DisplayParams)
Change how this layer is displayed.
Geometry only affects the values written to whatever plane the layer already has, so this does not drop the warm start.
Sourcepub const fn is_force_composited(&self) -> bool
pub const fn is_force_composited(&self) -> bool
Whether this layer is forced through composition.
Sourcepub const fn set_force_composited(&mut self, force: bool)
pub const fn set_force_composited(&mut self, force: bool)
Force this layer through composition rather than onto its own plane.
Flags for re-allocation: it changes what the allocator will consider, and therefore what is left for every other layer.
Sourcepub const fn identity_tag(&self) -> Option<u64>
pub const fn identity_tag(&self) -> Option<u64>
The caller’s identity for this layer, if it set one.
Sourcepub const fn set_identity_tag(&mut self, tag: Option<u64>)
pub const fn set_identity_tag(&mut self, tag: Option<u64>)
Label this layer with a caller-chosen identity.
Purely for the caller’s own lookups — see
identity_tag. The scene never interprets it,
and does not require it to be unique; a duplicate simply means
find_by_identity_tag answers with
the first match.
Sourcepub const fn pinned_plane(&self) -> Option<u32>
pub const fn pinned_plane(&self) -> Option<u32>
The plane this layer is pinned to, if any.
Sourcepub const fn set_pinned_plane(&mut self, plane_id: Option<u32>)
pub const fn set_pinned_plane(&mut self, plane_id: Option<u32>)
Pin this layer to a plane, or clear the pin with None.
For a caller that needs a specific plane rather than whichever one the
allocator picks: a driver-bound producer, a plane with hardware the
others lack, or a layout the caller has already validated. Honored
where it can be, reported where it cannot — see
pinned_plane.
Flags for re-allocation, because it changes where this layer goes and therefore what is left for everything else.
Sourcepub const fn content_type(&self) -> ContentType
pub const fn content_type(&self) -> ContentType
The allocator’s content-type hint.
Sourcepub const fn set_content_type(&mut self, content_type: ContentType)
pub const fn set_content_type(&mut self, content_type: ContentType)
Change the content-type hint.
Unlike the display setters this changes plane scoring, so it also flags the layer for re-allocation: the scene drops the warm start that frame and lets the layer move to a plane its new hint prefers.
Sourcepub const fn update_hint_hz(&self) -> u32
pub const fn update_hint_hz(&self) -> u32
The producer’s expected refresh rate, or 0.
Sourcepub const fn set_update_hint(&mut self, hz: u32)
pub const fn set_update_hint(&mut self, hz: u32)
Change the refresh-rate hint. Flags for re-allocation, as above.
Sourcepub const fn app_priority(&self) -> u8
pub const fn app_priority(&self) -> u8
The application’s placement priority within a content class.
Sourcepub const fn set_app_priority(&mut self, priority: u8)
pub const fn set_app_priority(&mut self, priority: u8)
Change the placement priority. Flags for re-allocation, as above.
Sourcepub const fn hints_dirty(&self) -> bool
pub const fn hints_dirty(&self) -> bool
Whether a hint changed since the last commit.