pub struct ParallelRenderer {
pub config: ParallelRenderConfig,
}Expand description
Splits a timeline into frame chunks and renders them in parallel.
On WASM targets rayon is unavailable, so chunks are processed sequentially to keep the API surface identical across platforms.
Fields§
§config: ParallelRenderConfigRender configuration.
Implementations§
Source§impl ParallelRenderer
impl ParallelRenderer
Sourcepub fn new(config: ParallelRenderConfig) -> Self
pub fn new(config: ParallelRenderConfig) -> Self
Create a new parallel renderer.
Sourcepub fn split_chunks(&self, total_frames: u64) -> Vec<RenderChunk>
pub fn split_chunks(&self, total_frames: u64) -> Vec<RenderChunk>
Split total_frames into a list of RenderChunks.
Each chunk covers at most config.chunk_size frames. The final chunk
may be smaller.
Sourcepub fn render_parallel(
&self,
total_frames: u64,
timeline: &Arc<Timeline>,
) -> EditResult<Vec<ParallelRenderResult>>
pub fn render_parallel( &self, total_frames: u64, timeline: &Arc<Timeline>, ) -> EditResult<Vec<ParallelRenderResult>>
Render total_frames from timeline in parallel.
Returns a result per chunk. Individual chunk failures do not abort the
remaining chunks — errors are captured in ParallelRenderResult::error.
Sourcepub fn render_chunk(
&self,
chunk: &RenderChunk,
_timeline: &Arc<Timeline>,
) -> ParallelRenderResult
pub fn render_chunk( &self, chunk: &RenderChunk, _timeline: &Arc<Timeline>, ) -> ParallelRenderResult
Render a single RenderChunk.
The current implementation counts frames and records timings; actual pixel decoding is handled by the timeline’s render pipeline.
Sourcepub fn total_frames_for(&self, total_frames: u64) -> u64
pub fn total_frames_for(&self, total_frames: u64) -> u64
Total number of frames that would be rendered given total_frames.
Auto Trait Implementations§
impl Freeze for ParallelRenderer
impl RefUnwindSafe for ParallelRenderer
impl Send for ParallelRenderer
impl Sync for ParallelRenderer
impl Unpin for ParallelRenderer
impl UnsafeUnpin for ParallelRenderer
impl UnwindSafe for ParallelRenderer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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