pub struct TimelineRenderer { /* private fields */ }Expand description
Timeline renderer.
Implementations§
Source§impl TimelineRenderer
impl TimelineRenderer
Sourcepub fn new(timeline: Arc<Timeline>, config: RenderConfig) -> Self
pub fn new(timeline: Arc<Timeline>, config: RenderConfig) -> Self
Create a new timeline renderer.
Sourcepub fn mark_dirty(&mut self, start_frame: u64, end_frame: u64)
pub fn mark_dirty(&mut self, start_frame: u64, end_frame: u64)
Mark a frame range [start_frame, end_frame) as dirty (needs re-render).
Overlapping or adjacent regions are coalesced automatically.
Sourcepub fn clear_dirty(&mut self)
pub fn clear_dirty(&mut self)
Clear all dirty regions (mark entire timeline as clean).
Sourcepub fn force_full_redraw(&mut self)
pub fn force_full_redraw(&mut self)
Mark the entire timeline as dirty, forcing a full re-render.
Sourcepub fn is_position_dirty(&self, position: i64) -> bool
pub fn is_position_dirty(&self, position: i64) -> bool
Returns true when the given frame position overlaps any dirty region.
If no dirty regions are tracked (empty list) the frame is always considered dirty so the renderer behaves as if all regions need updating.
Sourcepub fn prefetch_playhead(&self) -> i64
pub fn prefetch_playhead(&self) -> i64
Expose the prefetch engine’s last known playhead position for tests.
Sourcepub fn set_use_parallel(&mut self, enabled: bool)
pub fn set_use_parallel(&mut self, enabled: bool)
Enable or disable parallel multi-track rendering.
Sourcepub fn use_parallel(&self) -> bool
pub fn use_parallel(&self) -> bool
Return whether parallel rendering is active.
Sourcepub async fn render_frame_at(
&mut self,
position: i64,
) -> EditResult<RenderFrame>
pub async fn render_frame_at( &mut self, position: i64, ) -> EditResult<RenderFrame>
Render a frame at a specific timeline position.
Sourcepub fn start_background_render(&mut self) -> BackgroundRenderer
pub fn start_background_render(&mut self) -> BackgroundRenderer
Start background rendering.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear frame cache.
Auto Trait Implementations§
impl Freeze for TimelineRenderer
impl RefUnwindSafe for TimelineRenderer
impl Send for TimelineRenderer
impl Sync for TimelineRenderer
impl Unpin for TimelineRenderer
impl UnsafeUnpin for TimelineRenderer
impl UnwindSafe for TimelineRenderer
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