pub struct FramesWithText<'a> { /* private fields */ }Expand description
A host’s frame provider together with its text store: frames come from the one and text from the other.
Implementations§
Source§impl<'a> FramesWithText<'a>
impl<'a> FramesWithText<'a>
Sourcepub fn new(frames: &'a dyn FrameProvider, texts: &'a TextTextures) -> Self
pub fn new(frames: &'a dyn FrameProvider, texts: &'a TextTextures) -> Self
frames with the texts texts holds.
Trait Implementations§
Source§impl FrameProvider for FramesWithText<'_>
impl FrameProvider for FramesWithText<'_>
Source§fn texture_for(
&self,
source: &SourceId,
time: MediaTime,
) -> Option<SourceView<'_>>
fn texture_for( &self, source: &SourceId, time: MediaTime, ) -> Option<SourceView<'_>>
Returns a texture for
source at the requested source timestamp. Read moreSource§fn pending_source_work(
&self,
source: &SourceId,
time: MediaTime,
) -> Option<&PendingSourceWork>
fn pending_source_work( &self, source: &SourceId, time: MediaTime, ) -> Option<&PendingSourceWork>
Returns presentation work that has not yet been submitted for this
physical source texture. The default covers already-ready textures.
Source§fn source_key(
&self,
source: &SourceId,
time: MediaTime,
) -> Option<RenderCacheKey>
fn source_key( &self, source: &SourceId, time: MediaTime, ) -> Option<RenderCacheKey>
A key for the texture
Self::texture_for returns: the host’s
promise that the texture’s pixels depend on nothing the key leaves
out: the source’s content, the frame, and how it was decoded,
converted, and presented. Pictures drawn from keyed sources can be
kept and reused (see alpha2_render::Renderer::set_result_cache_budget);
the default, no key, keeps nothing drawn from the source.Source§fn text(&self, key: u64) -> Option<TextTexture<'_>>
fn text(&self, key: u64) -> Option<TextTexture<'_>>
Returns the text
crate::text_key names, a caption or a text
generator prepared by the host’s crate::TextTextures. The default
holds none: a frame that shows text then fails with
RenderError::MissingText.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FramesWithText<'a>
impl<'a> !Send for FramesWithText<'a>
impl<'a> !Sync for FramesWithText<'a>
impl<'a> !UnwindSafe for FramesWithText<'a>
impl<'a> Freeze for FramesWithText<'a>
impl<'a> Unpin for FramesWithText<'a>
impl<'a> UnsafeUnpin for FramesWithText<'a>
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