pub struct FramesWithText<'a> { /* private fields */ }Expand description
A host’s frame provider combined with its text store.
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, promising its pixels depend on
nothing outside the key (content, frame, decode and conversion). Keyed sources let drawn
results be reused (alpha2_render::Renderer::set_result_cache_budget); the default
None disables reuse.Source§fn text(&self, key: u64) -> Option<TextTexture<'_>>
fn text(&self, key: u64) -> Option<TextTexture<'_>>
Returns the prepared text
crate::text_key names. With the default (none), a frame
showing text fails with RenderError::MissingText.Source§fn layout(&self, key: u128) -> Option<Arc<PreparedLayout>>
fn layout(&self, key: u128) -> Option<Arc<PreparedLayout>>
Returns the prepared layout
crate::layout_key names. With the default (none), a frame
showing a layout 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