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
impl RendererCore
Sourcepub fn new(device: Device, queue: Queue) -> Self
pub fn new(device: Device, queue: Queue) -> Self
new creates a renderer from a host-owned device and queue.
Sourcepub fn images(&mut self) -> &mut ImageStore
pub fn images(&mut self) -> &mut ImageStore
images returns the image store used for uploads and sampling.
Sourcepub fn set_text_tiers(&mut self, tiers: TextTiers)
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.
Sourcepub fn set_hide_missing_glyphs(&mut self, hide: bool)
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.
Sourcepub fn set_text_raster_hold(&mut self, held: bool)
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.
Sourcepub fn set_raster_hold(&mut self, held: bool)
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.
Sourcepub fn render(
&mut self,
dl: &DisplayList,
target: &RenderTarget<'_>,
) -> RenderStats
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.
Sourcepub fn memory_report(&self) -> MemoryReport
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.