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>
impl<B: StoreBackend> SurfaceRunner<B>
pub fn new(surface_id: SurfaceId, viewport: Viewport, backend: B) -> Self
pub fn surface_id(&self) -> SurfaceId
pub fn backend(&self) -> &B
pub fn backend_mut(&mut self) -> &mut B
pub fn profiler(&self) -> &FrameProfiler
pub fn next_frame_id(&mut self) -> FrameId
Sourcepub fn commit_store(
&mut self,
frame_id: FrameId,
reconcile_us: u64,
store: &NodeStore,
changes: &ChangeSet,
) -> Result<FrameTiming, BackendError>
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.
Sourcepub fn commit_with<F>(&mut self, flush: F) -> Result<FrameTiming, BackendError>
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>
impl<B> Sync for SurfaceRunner<B>
impl<B> Unpin for SurfaceRunner<B>
impl<B> UnsafeUnpin for SurfaceRunner<B>
impl<B> UnwindSafe for SurfaceRunner<B>where
B: UnwindSafe,
RawVecInner: UnwindSafe,
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