Skip to main content

Output

Struct Output 

Source
pub struct Output {
    pub kind: Vec<Kind>,
    pub frame: Vec<i32>,
    pub components: Vec<Component>,
    /* private fields */
}
Expand description

Pass-4 state per canvas.

Fields§

§kind: Vec<Kind>§frame: Vec<i32>§components: Vec<Component>

Implementations§

Source§

impl Output

Source

pub fn new(c: &Consensus, components: Vec<Component>) -> Self

Blocks never seen whole and clean in pass 2 get per-pixel fallback state; their compositor pixels must be supplied with Output::set_main before the first Output::emit.

Source

pub fn fallback_blocks(&self) -> Vec<usize>

Blocks that need the compositor’s pixels (fallback blocks), as indices into the grid.

Source

pub fn set_main(&mut self, b: usize, rgba: &[u8])

The compositor’s RGBA for fallback block b (alpha 255 = covered).

Source

pub fn emit( &mut self, c: &Consensus, frame: &Frame<'_>, still_previous: Option<&Frame<'_>>, footprint: &Footprint<'_>, tiers: &TierMap<'_>, pose: (i64, i64), tau: i32, frame_index: u32, main: &(dyn CellRef + Sync), writes: &mut Vec<BlockWrite>, )

One distinct-pose vote. still_previous is the immediately preceding frame only when the pose did not change. It can confirm a final settled state that contributes just one vote. Writes always copy native pixels; main is the compositor’s reference as cell means.

Source

pub fn sources(&self, c: &Consensus, deferred: &[Deferred]) -> Vec<i32>

Where each block’s pixels now come from, given the blocks Output::finish returned: the frame a whole block was copied from, MIXED for per-pixel fallback values, UNTOUCHED where the compositor’s pixels stand.

Source

pub fn finish(&self, c: &Consensus, tau: i32) -> Vec<Deferred>

The deferred blocks: a provisional view unless a view agreeing with the compositor’s block was at least as clean, and fallback pixels where a better-tier observation contradicts the compositor’s pixel.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.