Skip to main content

SurfaceRunner

Struct SurfaceRunner 

Source
pub struct SurfaceRunner<B: StoreBackend> { /* private fields */ }
Expand description

Manages frame sequencing and stage profiling for one rendered surface backed by a StoreBackend.

Implementations§

Source§

impl<B: StoreBackend> SurfaceRunner<B>

Source

pub fn new(surface_id: SurfaceId, viewport: Viewport, backend: B) -> Self

Source

pub fn surface_id(&self) -> SurfaceId

Source

pub fn backend(&self) -> &B

Source

pub fn backend_mut(&mut self) -> &mut B

Source

pub fn profiler(&self) -> &FrameProfiler

Source

pub fn next_frame_id(&mut self) -> FrameId

Source

pub fn commit_store( &mut self, frame_id: FrameId, reconcile_us: u64, store: &NodeStore, changes: &ChangeSet, ) -> Result<FrameTiming, BackendError>

Commits one already-committed (&NodeStore, &ChangeSet) directly into the backend with zero wire serialization or copying, recording exact FrameTiming in profiler.

Source

pub fn commit_with<F>(&mut self, flush: F) -> Result<FrameTiming, BackendError>

Runs a timed producer/commit closure against the backend and records exact FrameTiming.

Auto Trait Implementations§

§

impl<B> Forget for SurfaceRunner<B>

§

impl<B> Freeze for SurfaceRunner<B>

§

impl<B> Move for SurfaceRunner<B>

§

impl<B> RefUnwindSafe for SurfaceRunner<B>
where B: RefUnwindSafe,

§

impl<B> Send for SurfaceRunner<B>
where B: Send, RawVecInner: Send,

§

impl<B> Sync for SurfaceRunner<B>
where B: Sync, RawVecInner: Sync,

§

impl<B> Unpin for SurfaceRunner<B>
where B: Unpin, *const u8 is !null: Unpin,

§

impl<B> UnsafeUnpin for SurfaceRunner<B>

§

impl<B> UnwindSafe for SurfaceRunner<B>
where B: UnwindSafe, RawVecInner: UnwindSafe,

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.