Skip to main content

RendererCore

Struct RendererCore 

Source
pub struct RendererCore { /* private fields */ }
Expand description

RendererCore replays display lists on a host-owned wgpu device.

Hosts normally use the valo crate’s Context instead. This type is the GPU core that context wraps: it owns caches and pipelines, and holds no application content of its own.

Implementations§

Source§

impl RendererCore

Source

pub fn new(device: Device, queue: Queue) -> Self

new creates a renderer from a host-owned device and queue.

Source

pub fn images(&mut self) -> &mut ImageStore

images returns the image store used for uploads and sampling.

Source

pub fn device(&self) -> &Device

device returns the device used by this renderer.

Source

pub fn set_text_tiers(&mut self, tiers: TextTiers)

set_text_tiers controls how text is rendered across font-size ranges.

Valo uses bitmap masks below sdf_min, SDF below path_min, and outlines above it. The defaults suit normal use; override them only for specialized scaling or zoom behavior.

Source

pub fn set_hide_missing_glyphs(&mut self, hide: bool)

set_hide_missing_glyphs controls whether unresolved characters render blank.

By default, unresolved characters render the font’s .notdef glyph, usually a “tofu” box. This is common when CJK fallback fonts are missing. Use valo_text::FontDemand to detect characters hidden by this option.

Source

pub fn set_text_raster_hold(&mut self, held: bool)

set_text_raster_hold allows existing text rasters to stand in for missing sizes.

This applies to bitmap-mask and SDF text, not vector outlines. It is useful during rapid zooming: enable it while the gesture is active and clear it afterward so the next frame renders sharply.

Source

pub fn set_raster_hold(&mut self, held: bool)

set_raster_hold allows cached display-list textures to be reused at any scale.

This is useful during rapid zooming: enable it when the gesture starts and clear it when the view settles so caches refill at the final scale.

Source

pub fn render( &mut self, dl: &DisplayList, target: &RenderTarget<'_>, ) -> RenderStats

render draws a display list into a target and returns frame statistics.

Each call submits one command buffer.

Source

pub fn memory_report(&self) -> MemoryReport

memory_report returns resource counts and estimated GPU memory usage.

The counters feature adds the counters reported by wgpu.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,