pub struct SoftwareBackend { /* private fields */ }Expand description
Software rendering backend using tiny-skia
Implementations§
Source§impl SoftwareBackend
impl SoftwareBackend
Sourcepub fn new(context: &RenderContext) -> Result<Self, RenderError>
pub fn new(context: &RenderContext) -> Result<Self, RenderError>
Create a new software backend
Trait Implementations§
Source§impl RenderBackend for SoftwareBackend
impl RenderBackend for SoftwareBackend
Source§fn backend_type(&self) -> BackendType
fn backend_type(&self) -> BackendType
Get the backend type
Source§fn create_pipeline(&self) -> Result<Box<dyn Pipeline>, RenderError>
fn create_pipeline(&self) -> Result<Box<dyn Pipeline>, RenderError>
Create a pipeline for this backend
Source§fn composite_layers(
&mut self,
layers: &[IntermediateLayer],
context: &RenderContext,
) -> Result<Vec<u8>, RenderError>
fn composite_layers( &mut self, layers: &[IntermediateLayer], context: &RenderContext, ) -> Result<Vec<u8>, RenderError>
Composite layers into final frame
Source§fn render_layers_to_bitmaps(
&mut self,
layers: &[IntermediateLayer],
context: &RenderContext,
) -> Result<Vec<RenderBitmap>, RenderError>
fn render_layers_to_bitmaps( &mut self, layers: &[IntermediateLayer], context: &RenderContext, ) -> Result<Vec<RenderBitmap>, RenderError>
Render layers to a positioned bitmap list (libass
ASS_Image style)
instead of a composited frame buffer, skipping the full-frame clear/copy.
The default reports the backend does not support it.Source§fn composite_layers_incremental(
&mut self,
layers: &[IntermediateLayer],
dirty_regions: &[DirtyRegion],
previous_frame: &[u8],
context: &RenderContext,
) -> Result<Vec<u8>, RenderError>
fn composite_layers_incremental( &mut self, layers: &[IntermediateLayer], dirty_regions: &[DirtyRegion], previous_frame: &[u8], context: &RenderContext, ) -> Result<Vec<u8>, RenderError>
Composite layers incrementally (dirty regions only)
Source§fn supports_feature(&self, feature: BackendFeature) -> bool
fn supports_feature(&self, feature: BackendFeature) -> bool
Check if backend supports a specific feature
Auto Trait Implementations§
impl !RefUnwindSafe for SoftwareBackend
impl !UnwindSafe for SoftwareBackend
impl Freeze for SoftwareBackend
impl Send for SoftwareBackend
impl Sync for SoftwareBackend
impl Unpin for SoftwareBackend
impl UnsafeUnpin for SoftwareBackend
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
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