Skip to main content

Crate telar_renderer_core

Crate telar_renderer_core 

Source

Re-exports§

pub use culling::FontMetrics;
pub use culling::extend_bounds;
pub use font_config::FontConfig;
pub use style_pool::hash_path_style;
pub use style_pool::hash_rect_style;
pub use style_pool::hash_text_style;

Modules§

culling
dirty
font_config
gpu_sync
Process-global lock serializing GPU/window surface lifecycle against active rendering.
perf
Lightweight per-phase frame timing, gated on the TELAR_PERF env var. When disabled every entry point is a single relaxed-atomic load or an early return, so it is safe to leave the instrumentation compiled into release builds. Enabled it accumulates per-phase durations across both the UI thread (command build/clone) and the render thread (interpret/gpu) and dumps rolling averages via tracing — stdout on desktop, logcat on Android.
style_pool

Structs§

BorderRadius
Color
DrawState
Flat draw state tracking clips and transforms. Note: PushLayer and PopLayer commands are intentionally not tracked here; layers are managed outside this struct by the caller.
Gradient
GradientStop
GradientStops
Up to 8 gradient color stops. Fixed-size array preserves the Copy bound.
ImageData
PathData
PathStyle
RectStyle
ScaleScratch
Reusable scratch for scaling draw commands to physical pixels on the software path. Holds the output buffer plus per-frame caches keyed by the source Arc pointer, so a style shared by many commands (the common case for a UI tree) is scaled and heap-allocated once per frame rather than once per command.
Shadow
ShadowLayout
Stroke
Stroke style for drawing primitives. Includes join to control how corners are rendered in paths and rects; for line segments join is unused and defaults to Miter.
TextRun
One inline run of a rich-text paragraph: a slice of text with its own weight, slant, and colour. Paragraph metrics (font size, line height, wrapping, alignment) live on the DrawCommand::RichText base style, so a run overrides only what varies inline (bold, italic, a link’s colour).
TextStyle

Enums§

DrawCommand
FillRule
GradientKind
ImageFilter
LineCap
LineJoin
Paint
PathVerb
RendererError
TextAlign
Horizontal alignment of text within its box. Start is the writing-direction start (left in LTR).

Constants§

BEZIER_CIRCLE_K

Traits§

RenderBackend
Scale
ShapeStyle

Functions§

blur_padding
blur_sigma
expand_fill_layers
for_each_with_matrix
Iterates cmds calling f(cmd, cumulative_matrix) for every command. PushMatrix/PopMatrix update the matrix before the callback; all other commands see the matrix that was active when they were emitted.
hash_draw_commands
hash_draw_commands_into
hash_pod_slice
premultiply_rgba
scale_commands
transform_clip_rect
Maps clip rect r (in the currently-active transform’s local space) to window space — the axis-aligned bounds of its four mapped corners. Widgets emit clip rects in their own local space, but the renderer clips in window space, so a clip must be mapped through the active cumulative matrix (scroll/layout translations) to compose correctly.
would_expand_fill_layers
Cheap, allocation-free predicate for whether expand_fill_layers would rewrite any Rect into a synthetic PushLayer opacity triple. F1 damage tracking must treat these hidden layers like real PushLayers (their composite is not confined to the dirty rect), so it queries this first.