Skip to main content

FramePipelineExt

Trait FramePipelineExt 

Source
pub trait FramePipelineExt: FramePipeline + Sized {
    // Provided methods
    fn max_fps(self, max_fps: u32) -> ThrottledPipeline<Self> { ... }
    fn instrumented(
        self,
        metrics: Rc<RefCell<PhaseMetrics>>,
    ) -> InstrumentedPipeline<Self> { ... }
}
Expand description

Composition for pipelines.

A pipeline can wrap another one and leave everything it does not change to it, which is how independent concerns — capping the frame rate, timing the passes, inspecting what a frame is about to draw — stack in any order.

A decorator forwards the passes it does not change to the pipeline it wraps; the default draw then runs those forwards as one frame. A pass it forgets to forward falls back to the standard implementation of that pass, not the inner pipeline’s, so a decorator must forward every pass it wants the inner pipeline to decide.

Provided Methods§

Source

fn max_fps(self, max_fps: u32) -> ThrottledPipeline<Self>

Caps this pipeline at max_fps frames a second.

See ThrottledPipeline.

Source

fn instrumented( self, metrics: Rc<RefCell<PhaseMetrics>>, ) -> InstrumentedPipeline<Self>

Times this pipeline’s root passes, recording into metrics.

See InstrumentedPipeline.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§