pub struct SoftwareRenderer { /* private fields */ }Expand description
High-performance CPU tile and analytical-SDF software rasterizer with zero GPU dependencies.
Implementations§
Source§impl SoftwareRenderer
Multi-core lossless analytical-SDF and tile-band software rasterizer methods for SoftwareRenderer.
impl SoftwareRenderer
Multi-core lossless analytical-SDF and tile-band software rasterizer methods for SoftwareRenderer.
Sourcepub fn with_config(width: u32, height: u32, config: RenderConfig) -> Self
pub fn with_config(width: u32, height: u32, config: RenderConfig) -> Self
Sourcepub fn with_font_provider(
width: u32,
height: u32,
config: RenderConfig,
font_provider: NativeSystemFont,
) -> Self
pub fn with_font_provider( width: u32, height: u32, config: RenderConfig, font_provider: NativeSystemFont, ) -> Self
Sourcepub fn render(
&mut self,
display_list: &DisplayList,
damage: DamageRegion,
) -> (usize, usize)
pub fn render( &mut self, display_list: &DisplayList, damage: DamageRegion, ) -> (usize, usize)
Rasterizes display_list into the internal Framebuffer clipped to damage using multi-core parallel horizontal bands and lossless portal backdrop caching.
§Arguments
&Self- Mutable software renderer.&DisplayList- Backend-agnostic draw command stream.DamageRegion- Optional dirty damage region for partial rasterization.
§Returns
(usize, usize)- Tuple of(tiles_updated, pixels_shaded).
Source§impl SoftwareRenderer
impl SoftwareRenderer
pub fn get_framebuffer(&self) -> &Framebuffer
pub fn get_mut_framebuffer(&mut self) -> &mut Framebuffer
pub fn set_framebuffer(&mut self, val: Framebuffer) -> &mut Self
pub fn get_glyph_atlas(&self) -> &GlyphAtlas
pub fn get_mut_glyph_atlas(&mut self) -> &mut GlyphAtlas
pub fn set_glyph_atlas(&mut self, val: GlyphAtlas) -> &mut Self
pub fn get_font_provider(&self) -> &NativeSystemFont
pub fn get_mut_font_provider(&mut self) -> &mut NativeSystemFont
pub fn set_font_provider(&mut self, val: NativeSystemFont) -> &mut Self
pub fn get_measurer(&self) -> DeterministicTextMeasurer
pub fn get_mut_measurer(&mut self) -> &mut DeterministicTextMeasurer
pub fn set_measurer(&mut self, val: DeterministicTextMeasurer) -> &mut Self
pub fn set_text_layout_cache( &mut self, val: HashMap<(u64, u32), TextLayoutResult>, ) -> &mut Self
pub fn get_antialiasing(&self) -> AntialiasingMode
pub fn get_mut_antialiasing(&mut self) -> &mut AntialiasingMode
pub fn set_antialiasing(&mut self, val: AntialiasingMode) -> &mut Self
pub fn get_tile_size(&self) -> u32
pub fn get_mut_tile_size(&mut self) -> &mut u32
pub fn set_tile_size(&mut self, val: u32) -> &mut Self
pub fn get_mut_base_cache_width(&mut self) -> &mut u32
pub fn get_mut_base_cache_height(&mut self) -> &mut u32
pub fn get_mut_base_cache_hash(&mut self) -> &mut u64
pub fn get_mut_prev_base_hash(&mut self) -> &mut u64
Trait Implementations§
Source§impl Clone for SoftwareRenderer
impl Clone for SoftwareRenderer
Source§impl Debug for SoftwareRenderer
impl Debug for SoftwareRenderer
Auto Trait Implementations§
impl Forget for SoftwareRenderer
impl Freeze for SoftwareRenderer
impl Move for SoftwareRenderer
impl RefUnwindSafe for SoftwareRenderer
impl Send for SoftwareRenderer
impl Sync for SoftwareRenderer
impl Unpin for SoftwareRenderer
impl UnsafeUnpin for SoftwareRenderer
impl UnwindSafe for SoftwareRenderer
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