Skip to main content

Module style_shared

Module style_shared 

Source

Re-exports§

pub use crate::graph::quad_bounds;

Structs§

NodeStyle

Enums§

DrawPlacement
ResolvedBrush
A layer-resolved brush, split at the solid/gradient boundary.

Functions§

apply_layer_to_brush
apply_layer_to_color
The colour a primitive is actually painted in, once this layer has had its say.
combine_layers
compose_color_filters
primitives_for_placement
primitives_for_placement_retained
The full retained form: the compact recording buffers come from and return to the caller alongside the materialized primitives, so a command re-recording every frame allocates nothing in the steady state.
primitives_for_placement_reusing
primitives_for_placement recording into storage the caller retains between frames. A command that re-records every frame keeps one buffer whose capacity was earned on earlier frames; only the rare marker-bearing recording pays for a second output vector.
primitives_for_placement_verified
primitives_for_placement_retained with per-command similarity verification: when replay carries the command’s state, the freshly recorded compact form advances it BEFORE materialization, yielding the frame’s retained/dynamic span structure in primitive space. Rendering still materializes everything — consuming the spans (and skipping materialization for retained ones) is the renderer-side half of the retention work. The frame is only returned for marker-free recordings: content splitting reindexes the primitive vector, and no game-scale command records content markers.
resolve_layer_brush
apply_layer_to_brush without the solid-brush clone: the borrowed brush’s color is copied (or layer-adjusted) inline, and only gradients are cloned. Produces exactly the values apply_layer_to_brush would — both branches below mirror its fast path and its Solid arm verbatim.
scale_corner_radii