Skip to main content

draw

Function draw 

Source
pub fn draw(
    spawn: impl Fn(usize) -> Result<BoxedRenderer, RenderError> + Send + Sync + 'static,
    job: &RenderJob,
    count: usize,
) -> Result<Vec<Rendered>, SpreadError>
Expand description

Renders job count times in sequence on one renderer that spawn starts.

A fresh instance renders the same clip as any other fresh one, and each later render on one instance differs. So the draws come from one instance, and the set fails distinct when a render repeats. A retry after a crash starts a fresh instance, whose first render repeats the first draw, so it fails too. For the same reason count stops at RESTART_AFTER, where the session restarts its instance.

ยงErrors

Returns SpreadError::Runs for a count below MIN_RUNS or above RESTART_AFTER, SpreadError::Render for a render that failed on both tries and SpreadError::Repeated for a set with a repeated render.