struct Work {
comp: Compositor,
pool: DecoderPool,
text: TextRasterizer,
frame: Frame,
shapes: ShapeRasterizer,
spare: Vec<Frame>,
}Expand description
Per-worker scratch: a compositor with its own decoders and font cache.
Fields§
§comp: Compositor§pool: DecoderPool§text: TextRasterizer§frame: Frame§shapes: ShapeRasterizer§spare: Vec<Frame>Implementations§
Source§impl Work
impl Work
fn new() -> Self
Sourcefn gpu_render(
&mut self,
project: &Project,
t: f64,
w: u32,
h: u32,
tx: &Sender<GpuFrameRequest>,
) -> Option<Frame>
fn gpu_render( &mut self, project: &Project, t: f64, w: u32, h: u32, tx: &Sender<GpuFrameRequest>, ) -> Option<Frame>
One frame through the GPU: decode here, composite on the UI thread, exactly like export::GpuScratch.
None = the renderer died or stopped answering — caller falls back to the CPU compositor.
Sourcefn render_sec(&mut self, job: &Job, generation: &AtomicU64) -> Res
fn render_sec(&mut self, job: &Job, generation: &AtomicU64) -> Res
Render one whole second into the cache, streaming frames out as they are made (a second of 1080p RGBA is 250 MB, far too much to buffer). Decoding stays sequential, so the decoder never re-seeks.
Auto Trait Implementations§
impl Freeze for Work
impl !RefUnwindSafe for Work
impl Send for Work
impl !Sync for Work
impl Unpin for Work
impl !UnwindSafe for Work
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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