Skip to main content

FrameBuild

Struct FrameBuild 

Source
pub struct FrameBuild { /* private fields */ }
Expand description

A frame that has been built and is awaiting the kernel’s answer.

Holding one means holding acquisitions. Dropping it without finalizing leaks them — the same contract the C++ states, and the reason this type warns on drop.

Implementations§

Source§

impl FrameBuild

Source

pub const fn report(&self) -> &CommitReport

The report so far, complete except for what the kernel’s answer decides.

Source

pub fn held(&self) -> usize

How many buffers this frame is holding.

Source

pub fn plan(&self) -> &[PlanePlan]

Which layer landed on which plane, as lowered property bags.

This is what an apply commit writes. Unless the frame took the FB-only fast path, the search that produced it ran against TEST_ONLY commits, so by the time a caller sees this the kernel has already accepted this exact set – emitting it is the cheap part. On the fast path the real commit is the first test.

Source

pub const fn restates_sticky(&self) -> bool

Whether emission restates every plane’s sticky properties – COLOR_ENCODING and COLOR_RANGE – rather than only the ones that changed since the kernel last took them.

True until the scene knows what the kernel holds: on the first frame, and the first after resume or rebind, when whoever held the planes meanwhile may have left them on their own settings.

Source

pub fn disables(&self) -> &[u32]

Planes this frame has to switch off.

Candidate planes the frame did not use and that the kernel does not already have off. Re-disabling an already-off plane is two property writes per plane per frame that change nothing.

Computed at build time for the same reason as PlanePlan::baseline: finalizing the frame replaces the state this is derived from.

Trait Implementations§

Source§

impl Debug for FrameBuild

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for FrameBuild

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.