Skip to main content

SoftwareRenderer

Struct SoftwareRenderer 

Source
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.

Source

pub fn with_config(width: u32, height: u32, config: RenderConfig) -> Self

Creates a software renderer configured for width x height physical pixels.

§Arguments
  • u32 - Physical width.
  • u32 - Physical height.
  • RenderConfig - Rendering configuration.
§Returns
  • Self - Ready-to-draw software renderer.
Source

pub fn with_font_provider( width: u32, height: u32, config: RenderConfig, font_provider: NativeSystemFont, ) -> Self

Creates a software renderer configured with an explicit NativeSystemFont provider.

§Arguments
  • u32 - Physical width.
  • u32 - Physical height.
  • RenderConfig - Rendering configuration.
  • NativeSystemFont - Native OS or deterministic font provider.
§Returns
  • Self - Ready-to-draw software renderer.
Source

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 dirty-rect scoped 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

pub fn text_layout_cache_stats(&self) -> (u64, u64, u64, usize)

Returns cumulative TextLayoutCache telemetry (hits, misses, evictions, resident_bytes).

§Arguments
  • &Self - Software renderer reference.
§Returns
  • (u64, u64, u64, usize) - Tuple (cache_hits, cache_misses, evictions, resident_bytes).
Source§

impl SoftwareRenderer

Source

pub fn get_framebuffer(&self) -> &Framebuffer

Source

pub fn get_mut_framebuffer(&mut self) -> &mut Framebuffer

Source

pub fn set_framebuffer(&mut self, val: Framebuffer) -> &mut Self

Source

pub fn get_glyph_atlas(&self) -> &GlyphAtlas

Source

pub fn get_mut_glyph_atlas(&mut self) -> &mut GlyphAtlas

Source

pub fn set_glyph_atlas(&mut self, val: GlyphAtlas) -> &mut Self

Source

pub fn get_font_provider(&self) -> &NativeSystemFont

Source

pub fn get_mut_font_provider(&mut self) -> &mut NativeSystemFont

Source

pub fn set_font_provider(&mut self, val: NativeSystemFont) -> &mut Self

Source

pub fn get_measurer(&self) -> DeterministicTextMeasurer

Source

pub fn get_mut_measurer(&mut self) -> &mut DeterministicTextMeasurer

Source

pub fn set_measurer(&mut self, val: DeterministicTextMeasurer) -> &mut Self

Source

pub fn get_antialiasing(&self) -> AntialiasingMode

Source

pub fn get_mut_antialiasing(&mut self) -> &mut AntialiasingMode

Source

pub fn set_antialiasing(&mut self, val: AntialiasingMode) -> &mut Self

Source

pub fn get_tile_size(&self) -> u32

Source

pub fn get_mut_tile_size(&mut self) -> &mut u32

Source

pub fn set_tile_size(&mut self, val: u32) -> &mut Self

Source

pub fn get_mut_base_cache_width(&mut self) -> &mut u32

Source

pub fn get_mut_base_cache_height(&mut self) -> &mut u32

Source

pub fn get_mut_base_cache_hash(&mut self) -> &mut u64

Source

pub fn get_mut_prev_base_hash(&mut self) -> &mut u64

Source

pub fn get_mut_prev_portal_bounds(&mut self) -> &mut Option<Rect>

Source

pub fn get_mut_prev_portal_scrim(&mut self) -> &mut Option<Color>

Source

pub fn get_mut_prepped_bounds(&mut self) -> &mut Option<Rect>

Source

pub fn get_mut_prepped_fg_bounds(&mut self) -> &mut Option<Rect>

Source

pub fn get_serial_dispatches(&self) -> u64

Source

pub fn get_parallel_dispatches(&self) -> u64

Trait Implementations§

Source§

impl Clone for SoftwareRenderer

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SoftwareRenderer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SoftwareRenderer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.