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.Source§fn layout(&self, key: u128) -> Option<Arc<PreparedLayout>>
fn layout(&self, key: u128) -> Option<Arc<PreparedLayout>>
Returns the layout
crate::layout_key names, resolved and drawn
by the host’s crate::TextTextures, whose texts Self::text
lends. The default holds none: a frame that shows a layout 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
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> ⓘ
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