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
impl Output
Sourcepub fn new(c: &Consensus, components: Vec<Component>) -> Self
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.
Sourcepub fn fallback_blocks(&self) -> Vec<usize>
pub fn fallback_blocks(&self) -> Vec<usize>
Blocks that need the compositor’s pixels (fallback blocks), as indices into the grid.
Sourcepub fn set_main(&mut self, b: usize, rgba: &[u8])
pub fn set_main(&mut self, b: usize, rgba: &[u8])
The compositor’s RGBA for fallback block b (alpha 255 = covered).
Sourcepub 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>,
)
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.
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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