Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components Namespace Reference

Contains the implementation of the Donner ECS,. More...

Namespaces

namespace  filter_primitive
 Variant holding the parameters for each type of filter primitive.

Classes

struct  AnimationStyleContext
 Enables animated presentation values during the final style cascade pass. More...
struct  AnimatedValuesComponent
 Component on target entities that holds animated attribute overrides. More...
struct  AnimateMotionComponent
 Declarative motion-path values and timing. More...
struct  MPathComponent
 Reference from an mpath child to a local path element. More...
struct  AnimateTransformComponent
 Component storing <animateTransform>-specific data. More...
struct  AnimateValueComponent
 Component storing <animate>-specific value data. More...
struct  AnimationInterpolation
 Shared keyframe timing and composition attributes. More...
struct  AnimationSegment
 Selected keyframe interval and its eased progress. More...
struct  SampledAnimationMotion
 A sampled motion transform with its effective composition mode. More...
class  AnimationContextualWorkBudget
 Shared contextual preparation allowance; used only by serialized document preparation. More...
struct  AnimationContextualWorkContext
 Scoped preparation context; never carried by filter graphs, snapshots, or raster replay. More...
class  AnimationResourceBudget
 Per-document animation admission with optional owner-frame contextual preparation admission. More...
struct  AnimationInterval
 One resolved active interval, with the unconstrained repeating duration. More...
struct  AnimationStateComponent
 Runtime state of an animation element, computed each frame by the AnimationSystem. More...
class  AnimationSystem
 Evaluates declarative SVG animation elements at a document time and applies their values. More...
struct  AnimationTimeSpecifier
 One declarative timing source and its offset. More...
struct  AnimationTimingComponent
 Stores timing attributes for an animation element. More...
struct  AnimationValueContext
 Context required to resolve relative units and currentColor for an animated value. More...
class  ClockValue
 Represents a SMIL clock value, which can be a concrete time in seconds or indefinite. More...
struct  ContextualLengthSample
 An admitted value declaration with its resolved time, independent of document storage. More...
struct  ContextualLengthRecipe
 Ordered animation stack retained until the referencing instance's length context is known. More...
struct  SetAnimationComponent
 Component storing <set>-specific animation data. More...
struct  ClassComponent
 Holds the value of the class attribute of an element. More...
struct  ComputedClipPathsComponent
 Stores a computed clip path, which is used to clip the rendering of an entity. More...
struct  ConditionalProcessingComponent
 Stores the SVG conditional-processing attributes (requiredFeatures, requiredExtensions, systemLanguage) for an element. More...
struct  DescriptiveTextComponent
 Stores the concatenated text content of a descriptive element, such as <title>, <desc>, or <metadata>. More...
struct  DirtyFlagsComponent
 Tracks which computed properties are stale and need recomputation after a DOM mutation. More...
struct  RenderTreeState
 Global invalidation state, stored in the registry context via Registry::ctx(). More...
class  DocumentResourceFamilyBudget
 Shared live-memory envelope for a root SVG document and all cached subdocuments. More...
struct  DocumentResourceFamilyContext
 Shared budget handle carried by a root document and its cached subdocuments. More...
class  ElementTypeComponent
 Stores the parsed element type of the current entity. More...
struct  EvaluatedReferenceComponent
 Represents a reference to another entity which has been evaluated from a Reference string. More...
class  ComputedFilterResourceBudget
 Owns computed-filter structural reservations and shared raster payload admission. More...
struct  FilterComponent
 Parameters for a <filter> element. More...
struct  ComputedFilterComponent
 Computed filter parameters parsed by FilterSystem, represents the resolved DOM hierarchy of a <filter> element. More...
struct  FilterInput
 Identifies the input to a filter primitive node. More...
struct  FilterNode
 A single node in the filter graph, representing one filter primitive. More...
struct  FilterGraph
 The complete filter graph for a <filter> element. More...
struct  GpuFilterWorkingSet
 Conservative resource layout for the live float filter execution strategy. More...
struct  FilterWorkMultiplier
 Computes one primitive's full-surface work multiplier without changing its validation rules. More...
struct  FilterStandardInputUsage
 Standard filter inputs that a graph reads, other than SourceGraphic. More...
struct  CpuTransientBufferCount
 Computes one CPU primitive's transient float-buffer demand. More...
class  FilterExecutionBudget
 Shared per-frame filter budget. More...
struct  FilterPrimitiveComponent
 Parameters for SVGFilterPrimitiveStandardAttributes. More...
struct  FEGaussianBlurComponent
 Parameters for SVGFEGaussianBlurElement. More...
struct  FEFloodComponent
 Parameters for SVGFEFloodElement. More...
struct  FEOffsetComponent
 Parameters for SVGFEOffsetElement. More...
struct  FECompositeComponent
 Parameters for SVGFECompositeElement. More...
struct  FEColorMatrixComponent
 Parameters for SVGFEColorMatrixElement. More...
struct  FEBlendComponent
 Parameters for SVGFEBlendElement. More...
struct  FEDropShadowComponent
 Parameters for SVGFEDropShadowElement. More...
struct  FEComponentTransferComponent
 Marker component for SVGFEComponentTransferElement. More...
struct  FEFuncComponent
 Parameters for a feFuncR/G/B/A child element within feComponentTransfer. More...
struct  FEConvolveMatrixComponent
 Parameters for SVGFEConvolveMatrixElement. More...
struct  FEMorphologyComponent
 Parameters for SVGFEMorphologyElement. More...
struct  FETileComponent
 Marker component for SVGFETileElement. More...
struct  FEImageComponent
 Parameters for SVGFEImageElement. More...
struct  FEDisplacementMapComponent
 Parameters for SVGFEDisplacementMapElement. More...
struct  FETurbulenceComponent
 Parameters for SVGFETurbulenceElement. More...
struct  FEMergeComponent
 Marker component for SVGFEMergeElement. More...
struct  FEMergeNodeComponent
 Parameters for a feMergeNode child element within feMerge. More...
struct  LightSourceComponent
 Light source parameters, stored on feDistantLight, fePointLight, or feSpotLight child elements. More...
struct  FEDiffuseLightingComponent
 Parameters for SVGFEDiffuseLightingElement. More...
struct  FESpecularLightingComponent
 Parameters for SVGFESpecularLightingElement. More...
class  FilterSystem
 Handles parsing and instantiating SVG filter effects from the SVG DOM. More...
struct  FontMetricDependenciesComponent
 Faces used to resolve font-relative shape lengths, independently of any text subtree. More...
struct  ChildFontPaintDependencies
 Owned evidence for pixels drawn from a separate registry. The weak handle does not keep an obsolete source document alive. Its budget and revision cannot be replaced by a parent's face. More...
struct  FontPaintDependenciesComponent
 Faces used by lazy paint work on one consuming rendering instance. These snapshots survive temporary offscreen traversals and include external SVG images as separate consumers. More...
struct  FontResourcePreparationState
 Changes to prepared geometry or captured child evidence invalidate operation-local graph caches. More...
struct  RenderedFontResourceScope
 Exclusions belong only to the last completed render. Target preflight never consults this proof. More...
class  ScopedFontResourceRender
 A render scope accepts exclusions only after its caller completes the corresponding traversal. More...
class  FontResourceGraph
 A frame-local snapshot of the font dependencies and resolved reference ranges of the render tree. More...
class  FontResourceGraphCache
 Bounded reuse within one render preparation or font-refresh traversal. No entry survives the operation, and preparation changes invalidate both the graph and its target collections. More...
class  GeometryPreparationResourceBudget
 Owns the current computed-path reservation for one document registry. More...
struct  HyperlinkComponent
 Stores the hyperlink target for an <a> element. More...
struct  IdComponent
 Holds the value of the id attribute of an element. More...
struct  ExternalUseInstanceContext
 Registry context installed on a referenced document while an external <use> draws the element it names. More...
class  LayoutSystem
 Handles layout and bounds calculations for SVG elements. More...
struct  SizedElementProperties
 Stores an offset/size for elements that are positioned with x/y/width/height attributes with respect to their parent. More...
struct  SizedElementComponent
 Stores the properties of a sized element, x, y, width, height. More...
struct  ComputedSizedElementComponent
 Stores the computed bounds of a sized element, resolving units and percentages. More...
struct  ComputedShadowSizedElementComponent
 Stores a shadow tree's computed SizedElementComponent, where a <use> element overrides the width or height on <symbol> or <svg> which use SizedElementComponent. More...
struct  SymbolComponent
 Stores unique parameters for the <symbol> element. More...
struct  TransformComponent
 Stores the raw transform value set on an entity, for the transform presentation attribute. More...
struct  ComputedLocalTransformComponent
 Stores the computed local transform for an entity (after CSS cascade + percentage/viewport resolution). More...
struct  ComputedAbsoluteTransformComponent
 Stores the computed absolute transform for an entity - the full cascade of ancestor transforms composed together. More...
struct  ViewBoxComponent
 A component attached to entities that have a viewBox attribute, such as <svg> and <pattern>. More...
struct  ComputedViewBoxComponent
 Computed value of a viewBox for the current element. More...
class  NodeLifetimeCollector
 Collects detached SVG DOM subtrees when no public handles retain them. More...
struct  NodeExternalRefState
 Shared control block retained by public SVG DOM element wrappers. More...
struct  NodeLifetimeComponent
 Tracks whether an SVG DOM node is attached to the document tree or currently detached. More...
struct  ClipPathComponent
 Parameters for the <clipPath> element. More...
struct  GradientComponent
 Common parameters for gradient elements, <linearGradient> and <radialGradient>. More...
struct  ComputedGradientComponent
 Created by PaintSystem during render tree instantiation. More...
struct  LinearGradientComponent
 Parameters for a <linearGradient> element. More...
struct  ComputedLinearGradientComponent
 Computed properties for a <linearGradient> element. More...
struct  MarkerComponent
 Stores the marker data for an SVG element. More...
struct  MaskComponent
 Parameters for the <mask> element. More...
class  PaintSystem
 Manages Paint Servers for gradients and patterns, handling style and structural inheritance and creating "computed" state and shadow trees for these elements. More...
struct  PatternComponent
 Parameters for <pattern> elements which are not captured by ViewBoxComponent and SizedElementComponent. More...
struct  ComputedPatternComponent
 Computed properties for <pattern> elements, after resolving and inheriting values from referenced patterns. More...
struct  RadialGradientComponent
 Parameters for a <radialGradient> element. More...
struct  ComputedRadialGradientComponent
 Computed properties for a <radialGradient> element. More...
struct  StopProperties
 Parameters for a <stop> element. More...
struct  ComputedStopComponent
 Stores the computed properties of a <stop> element. More...
struct  StopComponent
 Stores the properties of a <stop> element. More...
class  ParsedPayloadResourceBudget
 Bounds dynamic payload retained while parsing one untrusted SVG document. More...
struct  PathLengthComponent
 Stores a user-overridden path length on an element. More...
struct  PreserveAspectRatioComponent
 Stores the preserveAspectRatio attribute of <svg> and <pattern>. More...
class  ReferenceResolutionBudget
 Bounds document-wide href inheritance traversal for filters, gradients, and patterns. More...
struct  RenderingBehaviorComponent
 Component that controls how the attached element is rendered, determines how different element types are rendered. More...
struct  SubtreeInfo
 Created on the start of a subtree, to inform the renderer about which element ends the current subtree, plus how many isolated layers need to be popped when the subtree is complete. More...
struct  PaintContextRemap
 Remap information for a paint inherited through the SVG2 context-fill / context-stroke keywords (https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint). More...
struct  PaintResolvedReference
 Contains rendering information for a paint server, such as the subtree needed if it establishes an isolated layer, and where the paint server is located. More...
struct  ResolvedClipPath
 Contains resolved information about the clip-path property, such as which element it is pointing to. More...
struct  ResolvedMask
 Contains resolved information about the mask property, such as which element it is pointing to. More...
struct  ResolvedMarkerLengths
 Animated marker lengths resolved once against the referencing rendering instance. More...
struct  ResolvedMarker
 Resolved <marker> reference applied to a rendering instance. More...
struct  SpanPatternPaint
 A pattern that a text span's own fill or stroke references, other than the pattern of the instance's own fill or stroke. More...
struct  RenderingInstanceComponent
 An instance of the entity in the rendering tree. More...
struct  DecodedImageCacheReclaimer
 Optional decoded-animation cache hook invoked before a family-budget reservation. More...
struct  DeferredDecodedImageComponent
 A decoded image waiting for enough recoverable document-family capacity. More...
struct  ImageComponent
 Parameters for the <image> element. More...
class  DecodedImageReservation
 Owns a decoded-raster reservation from a shared document-family budget. More...
struct  LoadedImageComponent
 Loaded raster image resource, created from a ImageComponent when the href references a raster image (PNG, JPEG, GIF). More...
struct  LoadedSVGImageComponent
 Loaded SVG sub-document, created from a ImageComponent when the href references an SVG file (image/svg+xml). More...
struct  ExternalUseComponent
 Loaded external SVG sub-document referenced by a <use> element. More...
class  ResourceManagerContext
 Resource manager, which handles loading resources from URLs and caching results. More...
struct  StylesheetImportBudget
 Bounds applied to one document-wide @import resolution pass, across every stylesheet of the document. More...
class  SubDocumentAdmission
 Internal count admission for retained SVG resource graphs. Resource graphs must be idle/serialized during traversal; the mutex protects metadata only. More...
class  SubDocumentCache
 Cache for parsed SVG sub-documents referenced by <image> or <use> elements. More...
class  ScopedRenderInvalidationRestore
 Auxiliary preparation may compute geometry, but cannot consume the canvas renderer's dirty obligations. Hold under the document write guard; restore only identities still alive. More...
struct  ComputedShadowTreeComponent
 An instantiated ShadowTreeComponent, which points to the roots of parallel entity trees. More...
class  OffscreenShadowTreeComponent
 Defines an offscreen shadow tree attached to the current entity (the shadow host). More...
struct  ShadowEntityComponent
 A component attached to entities in the shadow tree, indicating which light entity they are mirroring. More...
struct  ShadowTreeRootComponent
 Indicates root of an instantiated shadow tree, where the light entity is is the target of the href, e.g. More...
class  ShadowTreeComponent
 Indicates the entry point to a shadow tree, which instantiates a virtual tree of entities mirroring another entity's tree. More...
class  ShadowTreeResourceBudget
 Aggregate generated-entity and recursion budget shared by every shadow-tree source. More...
class  ShadowTreeSystem
 Instantiates shadow trees for elements that are not part of the main render graph, such as <use> and <pattern> elements. More...
struct  BoundsGeometryPiece
 One piece of an element's geometry and the transform that places it in a measurement space. More...
class  BoundsGeometryPaths
 Path copies that collected geometry holds, shared between pieces that hold the same path, such as the pieces of every external <use> of one fragment. More...
struct  BoundsGeometryCollector
 Where collected geometry goes: its pieces, the shared path copies they hold, and the allowance those copies are charged to. More...
struct  CircleProperties
 Properties for a <circle> element. More...
struct  ComputedCircleComponent
 Computed properties for a <circle> element, which applies values from the CSS cascade. More...
struct  CircleComponent
 Parameters for a <circle> element. More...
struct  ComputedInstanceGeometryComponent
 Selects instance-owned geometry, including an intentionally empty or refused path. More...
struct  ComputedPathComponent
 Stores a Path used for rendering a shape, which may be generated from the parameters of shapes such as circle, rect, line, poly, and path. More...
struct  EllipseProperties
 Parameters for a <ellipse> element. More...
struct  ComputedEllipseComponent
 Computed properties for a <ellipse> element, which applies values from the CSS cascade. More...
struct  EllipseComponent
 Parameters for a <ellipse> element. More...
struct  LineComponent
 Parameters for a <line> element. More...
struct  PathComponent
 Parameters for a <path> element. More...
struct  PolyComponent
 Parameters for a <polygon> or <polyline> element. More...
struct  RectProperties
 Parameters for a <rect> element. More...
struct  ComputedRectComponent
 Computed properties for a <rect> element, which applies values from the CSS cascade. More...
struct  RectComponent
 Parameters for a <rect> element. More...
struct  CircleClipGeometryBudget
 Shared work limit for resolving basic-shape reference geometry during one render preparation. More...
class  ShapeSystem
 Creates computed path for shapes such as <circle>, <line>, and <path>. More...
class  RetainedStyleBytes
 Shared retained-byte account for immutable computed-style records in one document. More...
struct  ComputedResourceOpacities
 Final resource opacities for this style instance, including explicit parent inheritance. More...
struct  ComputedStyle
 An element's computed style: the result of the style="" attribute, presentation attributes, the CSS stylesheets and inheritance from the parent. More...
struct  ComputedStyleComponent
 Holds an element's computed style, which is a combination of the style="" attribute, the CSS stylesheet, and the CSS cascade where properties are inherited from the parent. More...
class  TokenSequence
 Independently owned tokens whose style-byte reservation follows the last reference. More...
class  CustomPropertyMap
 Immutable case-sensitive names in sorted order, sharing independently charged token trees. More...
class  DocumentLayerOrder
 Frozen author layer ranks for one cascade pass. More...
struct  DoNotInheritFillOrStrokeTag
 This component is added to entities to indicate that 'fill' and 'stroke' attributes should not be inherited, which is used for <pattern> because it establishes a shadow tree, and we do not want to recursively inherit 'fill' or 'stroke' values into the children. More...
struct  ExternalUseStyleContext
 Installed only while the child document's write access is held. More...
struct  DisableMatchedPropertiesCacheForTesting
 Context switch for comparing the cached and uncached paths on the same document. More...
struct  MatchedOpacityInput
 The resource-specific declaration stored outside the local property registry. More...
struct  MatchedPropertiesKey
 Inputs to a computed record. The local component is borrowed only during lookup or insertion. More...
struct  MatchedPropertiesEntry
 Record and paint-origin inputs needed to install one occurrence of a shared style. More...
class  MatchedPropertiesCache
 Document-local second-chance cache. Each bucket has its own clock and at most eight entries. More...
struct  StylePassPhasesForTesting
 Test observations under the caller's document access. Per-node callbacks can be concurrent. They may synchronize the fixture but must not take a document guard or change storage. More...
struct  RuleIndexKey
 The bucket one selector-list entry is filed under in a RuleIndex: a simple selector of its subject (rightmost) compound that every element it matches must carry. More...
struct  RuleIndexElementKeys
 Selector keys held by value, for tests and callers that already have them split. More...
class  RuleIndex
 Candidate rules of one stylesheet, bucketed by a key of each selector-list entry's subject compound. More...
struct  ProjectedNonWhitespaceTextTag
 Non-whitespace authored text not represented by the active raw-text child view. Covers conversion pruning and typed appends after incremental source projection. More...
struct  SelectorRawTextAuthorityTag
 Incremental content projection retained a complete raw-text child view for selectors. More...
struct  SelectorRejectedTextTag
 A rejected source projection leaves retained typed text authoritative. More...
struct  SelectorDependency
 Which elements' selector matching can change when an element gains or loses a name (an id, a class, or an attribute), relative to that element. More...
class  SelectorDependencySummary
 For every id, class and attribute local name that appears in a stylesheet's selectors, the relations whose selector matching a change to that name can affect, plus the selector features that make a change reach further than names can express. More...
class  StyleAncestorFilter
 The keys of an element's ancestors, as a counting Bloom filter: for each ancestor on the chain selector matching walks (StyleParentElement), its lowercased tag name, its id, each class and each lowercased attribute local name, hashed with RuleIndex::AncestorKeyHash. More...
struct  StyleCascadeCounters
 Exact counts of the style cascade work done for one document. More...
struct  StyleCascadeMetrics
 Style cascade instrumentation kept in a document registry's context by the style system. More...
struct  StyleComponent
 Contains properties the style="" attribute for an element, local to the element. More...
class  RuleIndexElementView
 An element as the rule index and the ancestor filter read its keys: straight from its components, without copies. A shadow entity reads its tag from its own tree entity and its id, classes and attributes from its light entity. More...
class  CascadeAncestorFilter
 Optional pass-local ancestor test. The owning pass keeps the document stable while it runs. More...
struct  CascadeAncestorFilters
 A document may install a provider to create an independent filter for each executing context. An absent provider, or a null result, selects ordinary matching. Creation must be safe across independent document preparations. Each filter runs on its bound thread and can be destroyed on the pass owner after the join. More...
struct  UnindexedCascadeForTesting
 Test-only switch: while a registry's context holds this, the cascade and StyleSystem::collectMatchedStyleRules test every rule of every applicable stylesheet against every element instead of only the rule index's candidates. More...
struct  UnfilteredCascadeForTesting
 Runs the ordinary cascade without its ancestor filter for differential comparisons. More...
struct  StylesheetEditScanLimitsForTesting
 Test-only rule-to-element allowance for the old-and-new stylesheet edit scan. More...
class  StyleResourceBudget
 Aggregate stylesheet cascade and selector traversal budget for one style-computation pass. More...
struct  MatchedStyleRule
 Diagnostic record for one stylesheet rule that matched an element. More...
struct  StyleRuleAtSourceOffset
 Stylesheet rule found at a document source offset. More...
struct  CustomPropertyDeclarationBatchResult
 Internal result of one aggregate custom-property provenance query. More...
class  StyleSystem
 Computes stylesheet information for elements, applying the CSS cascade and inheritance rules. More...
struct  StylesheetSourceMapSegment
 Maps a contiguous span of parsed CSS text back to the SVG document source. More...
class  StylesheetSourceMap
 Source map for stylesheet text produced by concatenating <style> text/CDATA children. More...
struct  StylesheetImportOrigin
 Identifies a successful import occurrence in an imports-first flattened list. More...
struct  StylesheetComponent
 Data for a <style> element. More...
struct  TypedFilterAttributeEdit
 Result of SVGDocumentContext::reapplyTypedFilterAttributes. More...
class  SVGDocumentContext
 Holds global state of an SVG document, such as the root element, id-to-element mapping, and the document size. More...
struct  TextDecorationOrigin
 One originating text-decoration declaration, independent of descendant declarations. More...
class  TextDecorationData
 Immutable origin list with a shared document-family lifetime charge. More...
struct  ComputedTextComponent
 Pre-computed layout information for a text subtree. More...
struct  ComputedTextGeometryComponent
 Cached geometry for text layout and text-derived public API queries. More...
struct  TextComponent
 Defines the start of a text element, which may have other text elements as children. More...
struct  TextPathComponent
 Stores attributes specific to <textPath> elements. More...
struct  TextPositioningComponent
 Defines the positioning of a text element, which may have other text elements as children. More...
struct  TextRootComponent
 Defines the start of a text element, which may have other text elements as children. More...
class  TextSystem
 System to compute text layout spans from raw text and positioning attributes. More...
class  TreeMutation
 Central mutation service for SVG DOM tree edits. More...
class  ExternalUseStyleRetention
 Keeps a document referenced by external <use> elements styled for the occurrences that draw it, instead of restyling the whole document for every occurrence on every frame. More...
struct  TinySkiaPathCacheComponent
 Per-entity cache of a shape's donner::Path converted to tiny_skia::Path. More...
struct  TinySkiaImageCacheComponent
 Per-entity cache of a LoadedImageComponent's pixels converted from the straight-alpha ImageResource contract to the premultiplied form tiny-skia samples. More...
struct  MissingFallbackFontReported
 Registry context marker: the document's missing packaged fallback font was already reported. More...
class  RenderingContext
 Rendering controller, which instantiates and and manages the rendering tree. More...
struct  RetainedUpdatePlan
 The work a retained update performs, collected while checking that a frame's dirty set qualifies for one. More...

Concepts

concept  RuleIndexElement
 An element as RuleIndex::collectCandidates reads it.

Typedefs

using FilterPrimitive
 Variant holding any filter primitive type.
using ResolvedPaintServer
 The resolved paint server for a fill or stroke.
using ResolvedFilterEffect = std::variant<std::vector<FilterEffect>, ResolvedReference>
 The resolved filter effect for a filter.
using StylesheetImportFetch
 Fetch callback for one resolved import URL: returns the loaded bytes, or a diagnostic reason (which must not contain the URL) when the resource is refused or unavailable.
using ShadowSizedElementHandler
 Type definition for a callback to process sized elements.

Enumerations

enum class  TransformAnimationType : uint8_t {
  Translate ,
  Scale ,
  Rotate ,
  SkewX ,
  SkewY
}
 Transform type for <animateTransform>. More...
enum class  CalcMode : uint8_t {
  Discrete ,
  Linear ,
  Paced ,
  Spline
}
 How keyframe values are sampled over time. More...
enum class  AnimationPhase : uint8_t {
  Before ,
  Active ,
  After
}
 Phase of an animation element's lifecycle. More...
enum class  AnimationCollectionMode {
  ReadOnly ,
  DiscardExcludedState
}
 System that advances SVG animations based on the current document time. More...
enum class  AnimationFill : uint8_t {
  Remove ,
  Freeze
}
 Fill behavior when an animation finishes. More...
enum class  AnimationRestart : uint8_t {
  Always ,
  WhenNotActive ,
  Never
}
 Restart behavior for an animation. More...
enum class  FilterStandardInput : std::uint8_t {
  SourceGraphic ,
  SourceAlpha ,
  FillPaint ,
  StrokePaint ,
  BackgroundImage ,
  BackgroundAlpha
}
 Standard named inputs available to filter primitives. More...
enum class  FilterMemoryModel : std::uint8_t {
  CpuFloatNamedResults ,
  GpuAllNodes
}
 Intermediate-retention behavior used to estimate backend memory before filter execution. More...
enum class  RenderingBehavior {
  Default ,
  Nonrenderable ,
  NoTraverseChildren ,
  ShadowOnlyChildren
}
 Controls how the attached element is rendered, determines how different element types are rendered. More...
enum class  ShadowBranchType {
  Main ,
  OffscreenFill ,
  OffscreenStroke ,
  OffscreenMask ,
  OffscreenMarkerStart ,
  OffscreenMarkerMid ,
  OffscreenMarkerEnd ,
  OffscreenFeImage
}
 There are two types of shadow trees: More...
enum class  StylePassSelection {
  Missing ,
  Dirty
}
 Which serial visitation order the scheduled pass commits.
enum class  TextPathMethod {
  Align ,
  Stretch
}
 Method for placing glyphs along a path in <textPath>. More...
enum class  TextPathSide {
  Left ,
  Right
}
 Which side of the path to render text in <textPath>. More...
enum class  TextPathSpacing {
  Auto ,
  Exact
}
 Spacing mode for <textPath>. More...

Functions

std::optional< RcString > AnimationReferenceValue (Registry &registry, Entity target)
 Read the current typed resource reference, falling back to attributes for other elements.
AnimationValueContext AnimationContextFor (Registry &registry, Entity target, std::string_view attribute, AnimationResourceBudget &budget)
 Resolve units and colors for an animation target.
std::optional< RcString > CascadedAnimationPathData (Registry &registry, Entity target, AnimationResourceBudget &budget)
 Resolve typed, animated and CSS path data using the rendering cascade.
std::optional< std::string > UnderlyingAnimationValue (Registry &registry, Entity target, std::string_view attribute, const AnimationValueContext &context, AnimationResourceBudget &budget)
 Read the underlying presentation value, including lower animation layers.
std::optional< std::string > BaseAnimationValue (Registry &registry, Entity target, std::string_view attribute, const AnimationValueContext &context, AnimationResourceBudget &budget)
 Read the authored or styled base value without a lower animation override.
std::shared_ptr< const ContextualLengthRecipe > ContextualLengthFor (Registry &registry, Entity target, std::string_view attribute)
 Find an owning contextual recipe, following a shadow entity to its authored source.
std::optional< Lengthd > ResolveContextualLength (Registry &registry, Entity target, std::string_view attribute, Lengthd underlying, const AnimationValueContext &context)
 Admit and evaluate one contextual field using the shared frame preparation budget.
std::optional< AnimationSegment > SelectAnimationSegment (double progress, std::size_t count, const AnimationInterpolation &options, std::span< const double > distances={})
 Validate keyframe timing and select the interval for a normalized time.
SampledAnimationMotion SampleAnimationMotion (Registry &registry, Entity entity, const AnimateMotionComponent &motion, double progress, double iteration, AnimationResourceBudget &budget)
 Sample the supplemental transform for a motion animation.
constexpr std::size_t AnimatedFilterListCapacity (std::string_view name)
 The most numbers an animated filter number list keeps: one more than the attribute's structural limit, so a longer list is still over the limit and fails closed like the authored value, while the rest of it is never read.
template<typename Component, typename Value, typename Visitor>
bool VisitAnimationNumberFields (Registry &registry, Entity target, std::string_view name, std::initializer_list< std::pair< std::string_view, Value Component::* > > fields, Visitor &visitor)
 Visit a matching numeric field on an existing component.
template<typename Visitor>
bool VisitAnimationNumberAttribute (Registry &registry, Entity target, std::string_view name, Visitor &&visitor)
 Use one field mapping for numeric animation application and underlying-value reads.
std::optional< std::string > SerializeAnimationPathGeometry (const Path &path, AnimationResourceBudget &budget)
 Serialize typed geometry with bounded allocation and round-trip coordinate precision.
std::optional< std::string > SampleAnimationPath (double progress, double iteration, const SetAnimationComponent *set, const AnimateValueComponent *value, std::string_view underlying, AnimationResourceBudget &budget)
 Sample authored path parameters without geometry normalization.
Entity FindAnimationReference (Registry &registry, std::string_view id, AnimationResourceBudget &budget)
 Resolve an attached animation reference with bounded document traversal.
std::vector< Entity > CollectAnimationEntities (Registry &registry, AnimationCollectionMode mode=AnimationCollectionMode::ReadOnly)
 Collect attached animation declarations in document order.
bool IsAnimationInSvgNamespace (Registry &registry, Entity entity)
 Check that an element and its ancestors resolve to the SVG namespace.
std::optional< std::vector< AnimationTimeSpecifier > > ParseAnimationTimeList (std::string_view value)
 Parse a bounded timing list.
bool ResolveAnimationTimeline (Registry &registry, std::span< const Entity > animations, double time)
 Resolve animation intervals and select their state at an arbitrary document time.
bool ResolveAnimationTimeline (Registry &registry, std::span< const Entity > animations, double time, AnimationResourceBudget &budget)
 Resolve intervals using the caller's shared reference allowance.
bool InsertAnimationInstance (std::vector< double > &times, double time)
 Retain a finite event instance time, without discarding earlier intervals.
bool IsContextualScalarAttribute (std::string_view attribute)
 Whether a CSS scalar stack needs the final instance's parent cascade.
bool IsContextualPaintAttribute (std::string_view attribute)
 Whether a paint/color stack needs the final instance's cascade.
std::optional< std::string > SerializeAnimationUrl (std::string_view href)
 Serialize an escaped, quoted CSS URL within the animation output envelope.
std::optional< std::vector< Lengthd > > ParseAnimationLengths (std::string_view input)
 Parse a finite length list within the animation numeric-value limit.
std::optional< std::vector< Lengthd > > ParseAnimationOperandLengths (std::string_view input, const AnimationValueContext &context)
 Parse an operand's length list within context's numeric limit.
bool ValidAnimationNumericOperand (std::string_view input, const AnimationValueContext &context)
 Validate a source operand against the target's numeric grammar before interpolation.
std::optional< Lengthd > ParseAnimationLength (std::string_view attribute, std::string_view value)
 Parse one animated length, including axis-appropriate refX/refY reference keywords.
std::optional< std::string > CombineAnimationValues (std::string_view first, std::string_view second, double firstWeight, double secondWeight, const AnimationValueContext &context, bool secondIsOffset=false)
 Combine compatible numeric, length-list, or color values with linear weights.
std::optional< double > AnimationValueDistance (std::string_view first, std::string_view second, const AnimationValueContext &context)
 Compute the paced distance between compatible values.
template<typename Value, typename Sampler>
std::optional< Value > SampleContextualAnimationRecipe (const ContextualLengthRecipe &recipe, Value underlying, Sampler &&sampler)
 Fold an admitted contextual animation stack, rebuilding frozen to-only underliers as needed.
std::optional< std::pair< std::string, std::string > > SampleAnimationValue (double progress, double iteration, const SetAnimationComponent *setComp, const AnimateValueComponent *valueComp, const AnimateTransformComponent *transformComp, const std::string &underlying, const AnimationValueContext &context, AnimationResourceBudget *budget=nullptr)
 Sample one animation without document or timing side effects.
std::optional< Lengthd > SampleContextualLengthRecipe (const ContextualLengthRecipe &recipe, Lengthd underlying, const AnimationValueContext &context)
 Evaluate an admitted contextual length stack with the shared interpolation rules.
Entity FindAttachedEntityById (Registry &registry, const RcString &id)
 Finds an attached document-tree entity with the given ID.
bool IsConditionalProcessingAttribute (const xml::XMLQualifiedNameRef &name)
 Return true if name is one of the SVG conditional-processing attributes.
bool SetConditionalProcessingAttribute (ConditionalProcessingComponent &conditional, const xml::XMLQualifiedNameRef &name, std::string_view value)
 Store a conditional-processing attribute value.
bool RemoveConditionalProcessingAttribute (ConditionalProcessingComponent &conditional, const xml::XMLQualifiedNameRef &name)
 Clear a conditional-processing attribute value.
bool HasConditionalProcessingAttributes (const ConditionalProcessingComponent &conditional)
 Return true if any conditional-processing attribute is still present on conditional.
bool NonLanguageConditionalProcessingPasses (const ConditionalProcessingComponent &conditional)
 Evaluates an element's conditional-processing attributes other than systemLanguage.
bool EvaluateConditionalProcessing (const ConditionalProcessingComponent &conditional, std::span< const RcString > userLanguages)
 Evaluates an element's conditional-processing attributes.
bool EvaluateConditionalProcessing (const ConditionalProcessingComponent &conditional)
 Overload of EvaluateConditionalProcessing that uses the default user language list of {"en"}, matching resvg's default (the resvg-test-suite goldens are rendered with it).
bool SystemLanguageMatches (std::string_view systemLanguage, std::string_view userLanguage)
 Evaluates a single systemLanguage attribute value against the user-preferred language.
std::optional< size_t > SystemLanguageMatchRank (std::string_view systemLanguage, std::span< const RcString > userLanguages)
 Returns the index of the highest-priority user-preferred language matched by a systemLanguage attribute value, for priority-ordered <switch> child selection.
bool ApplyLiveStyleUpdate (Registry &registry, ParseWarningSink &warningSink, StylePassScheduler scheduler)
 Apply the live style portion of a retained update.
bool HasSvgNamespace (const Registry &registry, Entity entity)
 Synthetic entities without an SVG element type remain eligible for internal styles/resources.
std::uint64_t FilterPrimitivePayloadBytes (const FilterPrimitive &primitive)
 Dynamic numeric storage retained by one primitive payload.
bool FilterGraphHasTurbulence (const FilterGraph &graph)
 Whether graph contains feTurbulence, whose noise both backends evaluate from raster pixel coordinates through only the linear part of the filter transform.
std::uint64_t GpuFilterParameterAllocationBound (std::uint64_t requested)
 Bounds new fixed-block allocations, including a partially filled starting block.
std::uint64_t GpuConvolveKernelBytes (const FilterPrimitive &primitive)
 Bytes of the separate kernel upload a Geode convolution makes beside its parameter block; zero for other primitives and for a kernel over the limit, which is refused without an upload.
std::uint64_t GpuBackdropFloatTextures (const FilterGraph &graph)
 Float textures the backdrop inputs of graph may hold: BackgroundImage and the BackgroundAlpha derived from it, each possibly in both color representations.
bool ComputeGpuFilterWorkingSet (const FilterGraph &graph, GpuFilterWorkingSet &result)
 Derives a byte-format-aware bound without allocating or changing the CPU filter model.
bool AddFilterRecipeWork (const FilterNode &node, std::uint64_t executions, std::uint64_t &workUnits)
 Adds contextual-region sampling work for one node.
bool AddFilterNodeWork (const FilterNode &node, std::uint64_t pixelCount, std::uint64_t executions, FilterMemoryModel memoryModel, std::uint64_t &workUnits)
 Adds one node's primitive work while preserving the established overflow checks.
bool InitializeFilterWork (const FilterGraph &graph, std::uint64_t pixelCount, FilterMemoryModel memoryModel, std::uint64_t &workUnits)
 Initializes the work estimate, including CPU animated-region coverage scans.
FilterStandardInputUsage StandardInputUsage (const FilterGraph &graph)
 Collects the standard inputs retained by a CPU filter execution.
std::uint64_t CpuRetainedBuffers (const FilterGraph &graph)
 Computes the maximum live CPU float-buffer count across the graph.
bool CpuFilterExecutionBytes (const FilterGraph &graph, std::uint64_t pixelCount, std::uint64_t workUnits, std::uint64_t &workUnitsOut, std::uint64_t &intermediateBytesOut)
 Finalizes the CPU intermediate-memory estimate.
bool GpuFilterExecutionBytes (const FilterGraph &graph, std::uint64_t memoryPixels, std::uint64_t executions, std::uint64_t workUnits, std::uint64_t &workUnitsOut, std::uint64_t &intermediateBytesOut)
 Finalizes the GPU parameter, image, and texture-memory estimate.
bool FilterGraphSizeIsValid (const FilterGraph &graph, std::uint64_t pixelCount)
 Validates graph and logical-surface limits before estimating any node work.
bool FilterMemoryRequestIsValid (std::uint64_t memoryPixels, std::uint64_t executions)
 Validates retained-surface and repeated-execution dimensions.
bool FilterGraphExecutionCost (const FilterGraph &graph, std::uint64_t pixelCount, FilterMemoryModel memoryModel, std::uint64_t &workUnitsOut, std::uint64_t &intermediateBytesOut, std::uint64_t memoryPixels=UINT64_MAX, std::uint64_t executions=1)
 Estimate a filter graph's aggregate execution cost for a pixel surface.
bool FilterGraphFitsExecutionBudget (const FilterGraph &graph, std::uint64_t pixelCount, FilterMemoryModel memoryModel)
 Return whether one filter graph fits the execution budget for a pixel surface.
void InvalidateFontResourcePreparation (Registry &registry)
 Advance the document's font-preparation epoch so cached dependency evidence is rebuilt.
Entity ExternalUseInstanceRoot (const Registry &registry)
 The root an external <use> is instantiating from registry, or entt::null.
ParseResult< bool > ParseSizedElementPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for sized elements (SVG, Use, Image), such as x, y, width, height.
bool IsEntityAttachedToDocument (const Registry &registry, Entity entity)
 Returns true when an entity is currently part of the live document tree.
ParseResult< bool > ParseStopPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <stop> element, such as stop-color and stop-opacity.
void InvalidateReferenceDependents (Registry &registry)
 Mark the elements that draw a changed element through a reference, so the next frame redraws them as well as the changed element:
bool HasPaint (const ResolvedPaintServer &paint)
 Returns true if the paint server is not a PaintServer::None.
bool IsProvablySamePaint (const ResolvedPaintServer &lhs, const ResolvedPaintServer &rhs)
 Returns true only when both paints are provably identical: both none, or the same solid color.
std::uint64_t SpanPatternSlotId (std::uint32_t document, int drawOrder, std::size_t index)
 The span pattern slot of entry index of RenderingInstanceComponent::spanPatternPaints for the instance at drawOrder in the document the renderer driver numbers document.
std::vector< css::Stylesheet > LoadStylesheetImports (const css::Stylesheet &stylesheet, const StylesheetImportFetch &fetch, StylesheetImportBudget &budget, ParseWarningSink &warnings, std::vector< StylesheetImportOrigin > *origins=nullptr)
 Load the @import rules of stylesheet and, recursively, of the stylesheets they import.
std::optional< Box2d > BoundGeometryPieces (std::span< const BoundsGeometryPiece > pieces, const Transform2d &targetFromSpace)
 Bounds of pieces after targetFromSpace maps their measurement space into a target space, or nothing when there are no pieces or a bound is not finite.
bool HasIdenticalPathData (const Path &first, const Path &second)
 Whether first and second hold exactly the same commands and points.
ParseResult< bool > ParseCirclePresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <circle> element, such as cx, cy, r.
ParseResult< bool > ParseEllipsePresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <ellipse> element, such as cx, cy, rx, ry.
ParseResult< bool > ParseRectPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <rect> element, such as x, y, width, height, rx, ry.
ParseResult< bool > ParsePathPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <path> element (the "d" attribute).
void ApplyPaintAnimationStyles (const Registry &registry, AnimationResourceBudget *animationBudget, Entity source, const ComputedStyleComponent *parent, bool inheritPaint, PropertyRegistry &properties)
 Sample paint and color stacks with the final instance's parent and current color.
bool TryParallelStylePass (Registry &registry, ParseWarningSink &warnings, tasks::TaskScheduler *scheduler, StylePassSelection selection)
 Try a scheduled cascade of the missing slots in this selection under the caller's document access.
ComputedResourceOpacities ApplyScalarAnimationStyles (const Registry &registry, AnimationResourceBudget *animationBudget, Entity dataEntity, const ComputedStyleComponent *parent, PropertyRegistry &properties, StyleResourceBudget &budget, ParseWarningSink &warnings)
 Resolve scalar animation stacks and resource opacities in the final instance cascade.
void RejectSelectorContentProjection (EntityHandle parent)
 Preserve the last accepted typed text when source projection rejects its replacement.
void AcceptSelectorTextValueProjection (EntityHandle parent)
 Accept a value-only edit without inferring a complete raw view from attached text deltas.
void ResetSelectorTextContent (EntityHandle parent)
 Replace typed text, discarding direct raw text left by incremental source projection.
void RecordAppendedSelectorText (EntityHandle parent, std::string_view text)
 Preserve a typed append when raw children are the active selector text representation.
void RecordDiscardedSelectorText (EntityHandle parent, const xml::XMLNode &node)
 Preserve direct text that is about to be consumed by SVG conversion.
void CompleteSelectorContentProjection (EntityHandle parent, bool contentsReparsed)
 Complete a successful content-projection pass, preserving attribute-only summaries.
bool IsSelectorEmpty (const Registry &registry, Entity dataEntity, css::SelectorTraversalBudget *budget)
 Inspect CSS emptiness using authored children and text on the authoritative data entity.
int CompareLowercased (std::string_view stored, std::string_view probe)
 Compare stored, which is already ASCII-lowercased, with probe ASCII-lowercased, as <=> would: negative, zero or positive.
int CompareExact (std::string_view stored, std::string_view probe)
 Compare stored with probe exactly, as <=> would: negative, zero or positive.
RcString Lowercased (const RcString &name)
 name with ASCII A-Z lowercased, sharing name's storage when it has no capitals.
template<typename Selector, typename Accept>
const Selector * FindSimple (const std::vector< css::CompoundSelector::Entry > &simple, Accept accept)
 The first simple selector of type Selector in simple that accept admits.
bool IsSiblingCombinator (css::Combinator combinator)
 Whether a combinator relates an element to its siblings (+ or ~) rather than to its ancestors.
Entity StyleDataEntity (const Registry &registry, Entity treeEntity)
 The entity that holds treeEntity's id, classes and attributes: the light element a shadow entity clones, or treeEntity itself.
Entity StyleParentElement (const Registry &registry, Entity treeEntity)
 The parent of treeEntity as selector matching walks to it, or entt::null where the walk stops: at a parent that is not an SVG element.
Entity InvalidateTextLayout (EntityHandle handle)
 Drop the cached text layout of the text root enclosing handle.
void InvalidateAnimatedText (Registry &registry, Entity entity)
 Invalidate animation-derived text caches when an animated text field changes.
std::ostream & operator<< (std::ostream &os, TextPathMethod method)
 Ostream output operator for TextPathMethod.
std::ostream & operator<< (std::ostream &os, TextPathSide side)
 Ostream output operator for TextPathSide.
std::ostream & operator<< (std::ostream &os, TextPathSpacing spacing)
 Ostream output operator for TextPathSpacing.
ParseResult< bool > ParseTextPositioningPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse the text positioning presentation attributes (x, y, dx, dy, rotate) on <text> / <tspan> / <textPath> elements into TextPositioningComponent, and invalidate the text root's cached layout so the next render picks the new positions up.
bool IsTextHidden (EntityHandle handle, bool parentHidden, const std::vector< RcString > &userLanguages)
 Whether the text content of handle paints no glyphs.
void RestoreAnimationAttributes (Registry &registry, Entity target=entt::null)
 Restore presentation-only paint/filter attributes before sampling the next frame.
bool ApplyAnimationAttributes (Registry &registry)
 Apply sampled paint/filter attributes with bounded restoration storage.
bool ReserveAnimationGeometryBackups (Registry &registry, AnimationResourceBudget &budget)
 Admit geometry restoration storage before applying any presentation mutation.
void RestoreAnimationPresentationForMutation (Registry &registry, Entity entity)
 Restore the target's base values before a typed DOM setter modifies them.
void RestoreAnimationPresentation (Registry &registry)
 Restore authored presentation before building reference trees and base styles.
void ApplyAnimationPresentation (Registry &registry)
 Sample animation and apply reversible style, geometry, and transform presentation values.
void RestoreAnimationReferences (Registry &registry, Entity target=entt::null)
 Restore authored resource references before rebuilding their presentation trees.
void FinalizeAnimationReferences (Registry &registry)
 Invalidate derived resources only when the final sampled reference changed. Call during a full rebuild, after old shadow instances have been torn down.
bool ApplyAnimationReferences (Registry &registry)
 Apply sampled resource references before shadow-tree expansion and resource loading.
void ForgetMissingFallbackFontReport (Registry &registry)
 Let the next render-tree preparation of the document report a missing packaged fallback font again, by removing its MissingFallbackFontReported marker, for a caller that discarded the earlier report.
bool IsDormantDefinitionUse (Registry &registry, Entity entity, const ShadowTreeComponent &shadowTree)
 Whether entity is a same-document <use> left unexpanded because it sits in a <defs> reached only through <g> ancestors.
std::optional< RetainedUpdatePlan > PlanRetainedUpdate (Registry &registry)
 Check whether the current dirty set of registry qualifies for a retained update, and plan it.
void ApplyRetainedUpdate (Registry &registry, const RetainedUpdatePlan &plan, ParseWarningSink &warningSink, StylePassScheduler scheduler={})
 Bring the computed components of registry up to date for a frame planned by PlanRetainedUpdate.
void AttachExternalUse (Registry &registry, Entity entity, const RcString &href, ParseWarningSink &warningSink)
 Give an external <use> the document its reference names, as an ExternalUseComponent.

Variables

constexpr double kMaximumFilterOffset = 4096.0
 Maximum accepted user-space filter offset magnitude.
constexpr double kMaximumFilterStdDeviation = 256.0
 Maximum accepted user-space blur standard deviation.
constexpr double kMaximumFilterMorphologyRadius = 256.0
 Maximum accepted user-space morphology radius.
constexpr int kMaximumFilterPixelOffset = 4096
 Maximum filter offset after conversion to device pixels.
constexpr int kMaximumFilterPixelRadius = 256
 Maximum blur standard deviation or morphology radius after conversion to device pixels.
constexpr std::uint64_t kMaximumFilterMorphologyPassesPerAxis = 9
 Geode decomposes morphology into shader passes whose per-axis radius is at most 31.
constexpr std::uint64_t kMaximumFilterMorphologyWorkMultiplier
 Bound for aggregate morphology work after splitting a large radius into shader passes.
constexpr std::uint64_t kMaximumFilterMorphologyRetainedBuffers
 Bound for temporary buffers retained by a multi-pass morphology execution.
constexpr int kMaximumFilterSurfaceDimension = 4096
 Maximum dimension of a filter-specific intermediate surface.
constexpr std::size_t kMaximumFilterSurfacePixels = 12 * 1024 * 1024
 Maximum pixel area of a filter-specific intermediate surface.
constexpr std::size_t kMaximumFilterGraphNodes = 32
 Maximum number of primitives retained in one computed filter graph.
constexpr std::size_t kMaximumFilterMergeInputs = 16
 Maximum number of inputs composited by one feMerge primitive.
constexpr std::size_t kMaximumFilterTableValues = 1024
 Maximum number of samples accepted for one feComponentTransfer channel table.
constexpr std::size_t kMaximumFilterColorMatrixValues = 20
 Maximum numeric payload accepted for feColorMatrix (the 5-by-4 matrix form).
constexpr int kMaximumFilterConvolveOrder = 64
 Maximum convolve order on either axis and aggregate kernel payload.
constexpr std::size_t kMaximumFilterKernelValues
 Maximum number of coefficients accepted by an feConvolveMatrix kernel.
constexpr std::uint64_t kMaximumFilterWorkUnits = 256ULL * 1024 * 1024
 Maximum aggregate pixel operations accepted for one filter execution.
constexpr std::uint64_t kMaximumFilterFrameWorkUnits = 512ULL * 1024 * 1024
 Maximum aggregate pixel operations accepted across one rendered frame.
constexpr std::uint64_t kMaximumFilterIntermediateBytes = 256ULL * 1024 * 1024
 Maximum estimated bytes retained by filter intermediates during one execution.
constexpr std::uint64_t kMaximumFilterFrameBytes = 256ULL * 1024 * 1024
 Maximum filter memory reserved across one frame, including RGBA capture surfaces.
constexpr double kMaximumFilterTurbulenceFrequency = 1024.0
 Maximum accepted feTurbulence base-frequency magnitude.
constexpr double kMaximumFilterTurbulenceSeed = 2147483646.0
 Maximum accepted feTurbulence seed magnitude (Park-Miller modulus minus one).
constexpr int kMaximumFilterTurbulenceOctaves = 16
 Maximum accepted feTurbulence octave count.
constexpr std::uint64_t kGpuFilterParameterBlockBytes = 64 * 1024
 Minimum allocation of each persistent parameter arena.
constexpr std::uint64_t kGpuFilterTransferTableBytes = 2 * 4096 * sizeof(float)
 Two 4096-entry float transfer tables retained by the filter engine.
constexpr std::size_t kMaximumFontChildDocuments = 64
 Use the existing parsed-child envelope for recursive traversal and per-host child references.
constexpr std::size_t kMaxSpanPatternPaints = std::size_t{1} << 16
 Most span patterns one instance records. A span referencing a further distinct pattern gets no slot: like a span that paints the text element's own pattern, it paints the text element's staged tile when the text has one, and otherwise paints nothing for that pattern, as for a pattern with no staged tile.
constexpr auto kAnySelector = [](const auto& ) { return true; }
 Admits every simple selector of the requested type.
constexpr bool kNativeStyleStackAdmission = false
 Platforms with the qualified native client stack admission contract.

Detailed Description

Contains the implementation of the Donner ECS,.

See also
Entity Component System (ECS).

Classes are named as follows:

  • *System - Stateless object that accesses and manipulates components.
  • *Component - Data storage struct with minimal logic, which may be attached to an Entity.
  • Computed*Component - Created when processing the tree and preparing it for rendering, stores intermediate object state derived from regular components. Is used to apply the CSS cascade and to cache shape path data.
  • *Context - Contains global state of an SVG document, which are stored in the Registry::ctx().
  • *Tag - Used to tag an entity with a specific purpose, like to disable rendering behavior (like inheritance with DoNotInheritFillOrStrokeTag).

Class Documentation

◆ donner::svg::components::AnimationStyleContext

struct donner::svg::components::AnimationStyleContext

Enables animated presentation values during the final style cascade pass.

Class Members
bool enabled = false Base-value sampling runs with this disabled.

◆ donner::svg::components::AnimatedValuesComponent

struct donner::svg::components::AnimatedValuesComponent

Component on target entities that holds animated attribute overrides.

When an animation is active, its computed value is stored here. The style system checks this map before falling back to base attribute values.

Sampled values are stored as raw strings consumed by the style and presentation passes. They remain separate from the authored XML attributes.

Class Members
unordered_map< string, shared_ptr< const ContextualLengthRecipe > > contextualLengths Immutable recipes for fields whose units depend on the final referencing instance.
unordered_map< string, string > overrides Map from attribute name to its animated value (as a raw string).

◆ donner::svg::components::MPathComponent

struct donner::svg::components::MPathComponent

Reference from an mpath child to a local path element.

Class Members
string href Local fragment reference.

◆ donner::svg::components::AnimationSegment

struct donner::svg::components::AnimationSegment

Selected keyframe interval and its eased progress.

Class Members
size_t from = 0 First keyframe index.
double progress = 0 Progress within the interval.
size_t to = 0 Second index, equal to from for a discrete value.

◆ donner::svg::components::SampledAnimationMotion

struct donner::svg::components::SampledAnimationMotion

A sampled motion transform with its effective composition mode.

Class Members
bool additive = false Whether to preserve lower motion layers.
string transform Supplemental translation and rotation, empty for invalid motion.

◆ donner::svg::components::AnimationContextualWorkContext

struct donner::svg::components::AnimationContextualWorkContext

Scoped preparation context; never carried by filter graphs, snapshots, or raster replay.

Class Members
shared_ptr< AnimationContextualWorkBudget > budget Owned allowance, without registry links.

◆ donner::svg::components::AnimationStateComponent

struct donner::svg::components::AnimationStateComponent

Runtime state of an animation element, computed each frame by the AnimationSystem.

This component is emplaced on animation entities and updated when the document time changes.

Class Members
double activeDuration = 0.0 Computed active duration in seconds.
double beginTime = 0.0 Resolved begin time in seconds (from timing attributes).
vector< double > eventBeginTimes Retained runtime begin instance times, sorted in document seconds.
vector< double > eventEndTimes Retained runtime end instance times, sorted in document seconds.
vector< AnimationInterval > intervals Resolved intervals for syncbase dependencies and lifecycle observation.
AnimationPhase phase = AnimationPhase::Before Current phase of this animation.
double repeatDuration = 0 Duration of repeating content before min/max/end constraints.
double simpleDuration = 0.0 Computed simple duration in seconds. 0 means unresolved, infinity means indefinite.
Entity targetEntity = entt::null The entity being targeted by this animation. Resolved from href or parent element.

◆ donner::svg::components::AnimationTimingComponent

struct donner::svg::components::AnimationTimingComponent

Stores timing attributes for an animation element.

These correspond to the SMIL timing attributes: begin, dur, end, repeatCount, repeatDur, fill, restart, min, max.

begin/end retain clock, syncbase, repeat, and event sources with signed offsets. Runtime events are retained separately so seeking can reconstruct earlier intervals.

Class Members
optional< ClockValue > beginOffset Parsed begin offset in seconds (from the earliest offset value in the begin list).
optional< string > beginValue Raw begin attribute value (semicolon-separated list of time values).
optional< ClockValue > dur The dur attribute: simple duration of the animation.
optional< ClockValue > endOffset Parsed end offset in seconds.
optional< string > endValue Raw end attribute value.
AnimationFill fill = AnimationFill::Remove fill: what to do when the animation ends.
optional< ClockValue > max max: maximum active duration.
optional< ClockValue > min min: minimum active duration.
optional< double > repeatCount repeatCount: number of iterations. Use infinity for "indefinite".
optional< ClockValue > repeatDur repeatDur: total repeat duration.
AnimationRestart restart = AnimationRestart::Always restart: when the animation can restart.

◆ donner::svg::components::AnimationValueContext

struct donner::svg::components::AnimationValueContext

Context required to resolve relative units and currentColor for an animated value.

Class Members
bool angleValue = false Marker orientation operands use SVG angle units.
RGBA currentColor = css::RGBA::RGB(0, 0, 0) Resolved currentColor.
Extent extent = Lengthd::Extent::Mixed Percentage reference axis.
FontMetrics fontMetrics Font and viewport unit metrics.
bool integerValue = false Round interpolated numeric values to the nearest integer. Integer values above this stay unrounded, so a value over an integer limit stays over it instead of rounding down to the limit.
bool keepLeadingNumbers = false Keep the first maximumNumbers operands of a longer list, without reading the rest, instead of rejecting it. Filter number lists use one more than their structural limit, so a longer list stays over the limit and fails closed like the authored value.
bool lengthValuesAreOffsets = false Sample operands are displacements, not positions.
bool linearRgb = false Interpolate colors in linear-light RGB when requested. Map mixed-unit filter lengths to user-space pixels while keeping additive offsets origin-free.
bool mappedLengths = false
double maximumInteger = std::numeric_limits<double>::infinity()
size_t maximumNumbers = 0
bool numberPair = false Repeat one coordinate for number-optional-number values.
bool percentageNumbers Percentages represent fractions of one, not viewport lengths.
double percentageOrigin = 0 Origin added only to percentage positions.
bool referenceValue = false References are discrete and non-additive. Zero accepts general values; otherwise only this many dimensionless operands are allowed.
double unitlessOrigin = 0 Origin added only to unitless positions.
double unitlessScale = 1 User units represented by one unitless coordinate.
Box2d viewBox {{0, 0}, {300, 150}} Current SVG viewport in user units.

◆ donner::svg::components::ContextualLengthSample

struct donner::svg::components::ContextualLengthSample

An admitted value declaration with its resolved time, independent of document storage.

Class Members
variant< AnimateValueComponent, SetAnimationComponent > declaration Owned declaration operands, admitted before capture.
shared_ptr< const ContextualLengthRecipe > frozenUnderlying Lower sandwich sampled at this layer's freeze boundary, for a partially frozen to-only animation. Null with usesFrozenUnderlying means the authored base. The recipe is built only from earlier layers, so ownership is acyclic.
double iteration = 0 Completed iteration count.
double progress = 0 Progress in the active iteration.
bool usesFrozenUnderlying = false Whether this layer's underlying value is rebuilt at its freeze boundary.

◆ donner::svg::components::SetAnimationComponent

struct donner::svg::components::SetAnimationComponent

Component storing <set>-specific animation data.

<set> is the simplest animation element: it sets a target attribute to a discrete value for the duration of the animation. It has no interpolation; the to value applies as-is when the animation is active.

Class Members
string attributeName The attributeName identifying which attribute to animate.
optional< string > href Optional href pointing to the target element. If absent, targets the parent element.
optional< string > to The to value to set when active; absence is distinct from an authored empty value.

◆ donner::svg::components::ClassComponent

struct donner::svg::components::ClassComponent

Holds the value of the class attribute of an element.

Class Members
RcString className The value of the class attribute.

◆ donner::svg::components::ComputedClipPathsComponent

struct donner::svg::components::ComputedClipPathsComponent

Stores a computed clip path, which is used to clip the rendering of an entity.

Aggregates together all paths that compose a clip path, including nested clip paths.

Class Members
vector< ClipPath > clipPaths All clip paths, in order they need to be applied based on their layer.
vector< FontFaceDependency > fontDependencies Faces whose accepted glyph/shape paths formed this consumer's clip, including nested clips.
uint64_t fontResourceRevision = 0
uint64_t hostFontKey = 0 FontManager::hostFontKey when this was prepared; a different key makes it stale.

◆ donner::svg::components::ConditionalProcessingComponent

struct donner::svg::components::ConditionalProcessingComponent

Stores the SVG conditional-processing attributes (requiredFeatures, requiredExtensions, systemLanguage) for an element.

Attached only when at least one of the attributes is present.

These attributes control whether an element renders: on a direct child of <switch> they select the highest-priority matching child, and on any other rendered element they disable rendering of the element (and its subtree) when they evaluate to false.

See https://www.w3.org/TR/SVG2/struct.html#ConditionalProcessing

Class Members
optional< RcString > requiredExtensions Raw requiredExtensions attribute value, a whitespace-separated list of extension IRIs.

Donner supports no extensions, so any non-empty value evaluates to false.

optional< RcString > requiredFeatures Raw requiredFeatures attribute value.

Deprecated in SVG2; always evaluates to true, matching resvg's behavior. Stored so the DOM state reflects the document.

optional< RcString > systemLanguage Raw systemLanguage attribute value, a comma-separated list of BCP 47 language tags.

Evaluates to true if any listed tag matches a user-preferred language.

◆ donner::svg::components::DescriptiveTextComponent

struct donner::svg::components::DescriptiveTextComponent

Stores the concatenated text content of a descriptive element, such as <title>, <desc>, or <metadata>.

Descriptive elements are never rendered; their text is retained purely so it can be surfaced through the DOM (for accessibility tooling, tooltips, and document metadata). The SVG element tree does not keep the source Data/CData child nodes that the XML parse tree carried, so this component is the authoritative live text source, mirroring how StylesheetComponent retains the raw CSS text for <style>.

Class Members
RcString text The concatenated text content of the descriptive element.

◆ donner::svg::components::DocumentResourceFamilyContext

struct donner::svg::components::DocumentResourceFamilyContext

Shared budget handle carried by a root document and its cached subdocuments.

Class Members
shared_ptr< DocumentResourceFamilyBudget > budget Family-wide retained-byte budget, if one is attached.

◆ donner::svg::components::EvaluatedReferenceComponent

struct donner::svg::components::EvaluatedReferenceComponent
template<typename ReferenceType>
struct donner::svg::components::EvaluatedReferenceComponent< ReferenceType >

Represents a reference to another entity which has been evaluated from a Reference string.

This is used by PaintSystem for gradients and patterns which have an href attribute for inheritance.

Template Parameters
ReferenceTypetag which determines which subsystem the reference is for, used to avoid collisions.
Class Members
typedef ReferenceType Type ReferenceType Tag type of this reference.
Class Members
EntityHandle target The resolved target entity of the reference.

◆ donner::svg::components::FilterComponent

struct donner::svg::components::FilterComponent

Parameters for a <filter> element.

Contains the filter bounds, which determines how large the canvas needs to be when applying the filter, and filter configuration such as units for its parameters.

Class Members
optional< ColorInterpolationFilters > colorInterpolationFilters The parsed value of the "color-interpolation-filters" property, which specifies the color space for filter operations.
optional< FilterUnits > filterUnits The parsed value of the "filterUnits" attribute, which defines the coordinate system for the x, y, width, and height attributes of the mask.
optional< Lengthd > height Height of the filter, defaults to 120% (outside of the element itself).
optional< Reference > href An optional href to another filter, used to inherit attributes and primitive children.
optional< PrimitiveUnits > primitiveUnits The parsed value of the "primitiveUnits" attribute, which defines the coordinate system for the various attributes of the filter effects.
optional< Lengthd > width Width of the filter, defaults to 120% (outside of the element itself).
optional< Lengthd > x The x-coordinate of the filter, defaults to -10% (outside the element itself).
optional< Lengthd > y The y-coordinate of the filter, defaults to -10% (outside the element itself).

◆ donner::svg::components::ComputedFilterComponent

struct donner::svg::components::ComputedFilterComponent

Computed filter parameters parsed by FilterSystem, represents the resolved DOM hierarchy of a <filter> element.

Class Members
ColorInterpolationFilters colorInterpolationFilters = ColorInterpolationFilters::Default
vector< FilterEffect > effectChain Parsed list of effects for backward-compatibility with existing renderer push/pop interface. Will be removed once the graph-based renderer API is complete.
FilterGraph filterGraph The filter graph built from child filter primitives.
FilterUnits filterUnits = FilterUnits::Default The computed filter units.
Lengthd height = Lengthd(120.0, Lengthd::Unit::Percent) The computed height of the filter.
PrimitiveUnits primitiveUnits = PrimitiveUnits::Default The computed primitive units. The computed color interpolation mode for filter operations.
Lengthd width = Lengthd(120.0, Lengthd::Unit::Percent) The computed width of the filter.
Lengthd x = Lengthd(-10.0, Lengthd::Unit::Percent) The computed x-coordinate of the filter.
Lengthd y = Lengthd(-10.0, Lengthd::Unit::Percent) The computed y-coordinate of the filter.

◆ donner::svg::components::GpuFilterWorkingSet

struct donner::svg::components::GpuFilterWorkingSet

Conservative resource layout for the live float filter execution strategy.

Class Members
uint64_t floatTextures = 0
uint64_t imageBytes = 0
uint64_t runtimeUniformBytes = 0
uint64_t standaloneBufferBytes = 0
uint64_t uniformBytes = 0

◆ donner::svg::components::FilterPrimitiveComponent

struct donner::svg::components::FilterPrimitiveComponent
Class Members
optional< Lengthd > height The height of the filter region.
optional< FilterInput > in The input specification for this filter primitive. Parsed from the in attribute. When nullopt, defaults to Previous (output of preceding primitive, or SourceGraphic for the first).
optional< FilterInput > in2 The second input specification for two-input primitives (e.g., feComposite, feBlend). Parsed from the in2 attribute.
optional< RcString > result Name of the filter primitive, which enables it to be used as a reference for subsequent filter primitives under the same <filter> element.
optional< Lengthd > width The width of the filter region.
optional< Lengthd > x The x-coordinate of the filter region.
optional< Lengthd > y The y-coordinate of the filter region.

◆ donner::svg::components::FEFloodComponent

struct donner::svg::components::FEFloodComponent

Parameters for SVGFEFloodElement.

Class Members
Property< Color > floodColor The flood fill color, defaults to black.
Property< double > floodOpacity {"flood-opacity", []() -> std::optional<double> { return 1.0; }} The flood fill opacity, defaults to 1. Range is [0, 1].

◆ donner::svg::components::FEOffsetComponent

struct donner::svg::components::FEOffsetComponent

Parameters for SVGFEOffsetElement.

Class Members
double dx = 0.0 The horizontal offset.
double dy = 0.0 The vertical offset.

◆ donner::svg::components::FEDropShadowComponent

struct donner::svg::components::FEDropShadowComponent

Parameters for SVGFEDropShadowElement.

Class Members
double dx = 2.0 Horizontal offset.
double dy = 2.0 Vertical offset.
Property< Color > floodColor The flood fill color, defaults to black.
Property< double > floodOpacity {"flood-opacity", []() -> std::optional<double> { return 1.0; }} The flood fill opacity, defaults to 1.
double stdDeviationX = 2.0 Blur standard deviation in X.
double stdDeviationY = 2.0 Blur standard deviation in Y.

◆ donner::svg::components::FEComponentTransferComponent

struct donner::svg::components::FEComponentTransferComponent

Marker component for SVGFEComponentTransferElement.

The element itself has no parameters; its children (feFuncR/G/B/A) define the transfer functions for each channel.

Class Members
int placeholder = 0 Placeholder to avoid empty struct issues with entt.

◆ donner::svg::components::FETileComponent

struct donner::svg::components::FETileComponent

Marker component for SVGFETileElement.

The feTile element has no element-specific parameters. It tiles its input's content (within the input's primitive subregion) across its own primitive subregion.

Class Members
int placeholder = 0 Placeholder to avoid empty struct issues with entt.

◆ donner::svg::components::FEImageComponent

struct donner::svg::components::FEImageComponent

Parameters for SVGFEImageElement.

Class Members
RcString href Image URL or fragment reference.
PreserveAspectRatio preserveAspectRatio How to fit the image.

◆ donner::svg::components::FEMergeComponent

struct donner::svg::components::FEMergeComponent

Marker component for SVGFEMergeElement.

The merge element itself has no parameters; its children (feMergeNode) specify the inputs.

Class Members
int placeholder = 0 Placeholder to avoid empty struct issues with entt.

◆ donner::svg::components::FEMergeNodeComponent

struct donner::svg::components::FEMergeNodeComponent

Parameters for a feMergeNode child element within feMerge.

Each merge node specifies an input via the in attribute. The inputs are composited bottom-to-top using Source Over.

Class Members
optional< FilterInput > in The input to this merge node. Parsed from the in attribute.

◆ donner::svg::components::FEDiffuseLightingComponent

struct donner::svg::components::FEDiffuseLightingComponent
Class Members
double diffuseConstant = 1.0 Diffuse reflection constant (kd).
Property< Color > lightingColor lighting-color property, specifying the color of the light source (default: white).
double surfaceScale = 1.0 Height of surface when alpha=1.

◆ donner::svg::components::FESpecularLightingComponent

struct donner::svg::components::FESpecularLightingComponent
Class Members
Property< Color > lightingColor lighting-color property, specifying the color of the light source (default: white).
double specularConstant = 1.0 Specular reflection constant (ks).
double specularExponent = 1.0 Specular exponent (1..128).
double surfaceScale = 1.0 Height of surface when alpha=1.

◆ donner::svg::components::FontMetricDependenciesComponent

struct donner::svg::components::FontMetricDependenciesComponent

Faces used to resolve font-relative shape lengths, independently of any text subtree.

Class Members
vector< FontFaceDependency > fontDependencies
uint64_t fontResourceRevision = 0
uint64_t hostFontKey = 0 FontManager::hostFontKey when this was prepared; a different key makes it stale.

◆ donner::svg::components::ChildFontPaintDependencies

struct donner::svg::components::ChildFontPaintDependencies

Owned evidence for pixels drawn from a separate registry. The weak handle does not keep an obsolete source document alive. Its budget and revision cannot be replaced by a parent's face.

Class Members
weak_ptr< DocumentState > document
vector< FontFaceDependency > fontDependencies
uint64_t fontResourceRevision = 0
bool needsRender = false
uint64_t preparationEpoch = 0
vector< FontFaceDependency > renderedFontDependencies
bool renderedNeedsRender = false
bool renderedResourceLimit = false
uint64_t renderScopeToken = 0
bool resourceLimit = false
Entity target = entt::null

◆ donner::svg::components::FontPaintDependenciesComponent

struct donner::svg::components::FontPaintDependenciesComponent

Faces used by lazy paint work on one consuming rendering instance. These snapshots survive temporary offscreen traversals and include external SVG images as separate consumers.

Class Members
vector< ChildFontPaintDependencies > children
vector< FontFaceDependency > fontDependencies
uint64_t fontResourceRevision = 0
uint64_t hostFontKey = 0 FontManager::hostFontKey when this was prepared; a different key makes it stale.
bool prepared = false
bool resourceLimit = false

◆ donner::svg::components::FontResourcePreparationState

struct donner::svg::components::FontResourcePreparationState

Changes to prepared geometry or captured child evidence invalidate operation-local graph caches.

Class Members
uint64_t epoch = 0

◆ donner::svg::components::RenderedFontResourceScope

struct donner::svg::components::RenderedFontResourceScope

Exclusions belong only to the last completed render. Target preflight never consults this proof.

Class Members
bool complete = false
Entity coverageRoot = entt::null
size_t depth = 0
unordered_set< Entity > excluded
uint64_t fontResourceRevision = 0
unordered_set< Entity > painted
bool pendingComplete = true
Entity pendingCoverageRoot = entt::null
unordered_set< Entity > pendingExcluded
uint64_t preparationEpoch = 0
uint64_t token = 0

◆ donner::svg::components::HyperlinkComponent

struct donner::svg::components::HyperlinkComponent

Stores the hyperlink target for an <a> element.

The <a> element is a transparent grouping/text-content container whose only element-specific state is the link target (href / xlink:href). The reference is retained so it round-trips through the DOM, but it does not affect rendering - Donner has no interactive navigation, so the link target is purely informational, matching how resvg rasterizes <a>.

Class Members
RcString href Link target, an IRI reference (e.g. "https://example.com/" or "#fragment").

◆ donner::svg::components::ExternalUseInstanceContext

struct donner::svg::components::ExternalUseInstanceContext

Registry context installed on a referenced document while an external <use> draws the element it names.

That element is the root of the instance: absolute transforms stop at it, as if its parent were the <use> element, and the render tree is built from it alone.

Class Members
Entity root The referenced element.

◆ donner::svg::components::SizedElementComponent

struct donner::svg::components::SizedElementComponent

Stores the properties of a sized element, x, y, width, height.

Used for <svg>, <image> and <foreignObject> by the standard, and also internally with <use> for Donner.

Class Members
bool applyTranslationForUseElement = false Set to true for <use> elements, so that x/y are applied as a translation.
bool canOverrideWidthHeightForSymbol = false Set to true for <symbol> elements, so that width/height are inherited from the <use> element.
SizedElementProperties properties The properties of the sized element, x, y, width, height.

◆ donner::svg::components::ComputedSizedElementComponent

struct donner::svg::components::ComputedSizedElementComponent

Stores the computed bounds of a sized element, resolving units and percentages.

Contains the computed rect and inherited viewBox of the parent element.

Class Members
Box2d bounds The computed rect of this sized element.
Box2d inheritedViewBox The viewBox of the parent element, used for preserveAspectRatio transformations.

◆ donner::svg::components::ComputedShadowSizedElementComponent

struct donner::svg::components::ComputedShadowSizedElementComponent

Stores a shadow tree's computed SizedElementComponent, where a <use> element overrides the width or height on <symbol> or <svg> which use SizedElementComponent.

From https://www.w3.org/TR/SVG2/struct.html#UseElement:

The width and height attributes only have an effect if the referenced element defines a viewport (i.e., if it is a 'svg' or 'symbol'); if so, a value other than auto for the 'use' element overrides the value of the corresponding geometric property on that element.

Class Members
Box2d bounds The computed rect of this sized element.

◆ donner::svg::components::SymbolComponent

struct donner::svg::components::SymbolComponent

Stores unique parameters for the <symbol> element.

refX and refY provide a reference point (if needed) when the symbol is instantiated by a <use> element. Per SVG2 they accept a <length> (including percentages, which resolve against the symbol's viewBox at layout time) or a keyword that maps to a percentage: refX left/center/right โ†’ 0%/50%/100%, refY top/center/bottom โ†’ 0%/50%/100%.

Class Members
SizedElementProperties properties The properties of the sized element, x, y, width, height.
Lengthd refX The reference x coordinate. Defaults to 0 (no unit).
Lengthd refY The reference y coordinate. Defaults to 0 (no unit).

◆ donner::svg::components::TransformComponent

struct donner::svg::components::TransformComponent

Stores the raw transform value set on an entity, for the transform presentation attribute.

This can be sourced from the transform="..." XML attribute, or from the transform CSS property.

Class Members
Property< CssTransform > transform Parsed value of the transform="..." presentation attribute / CSS transform property. Applied to entity-local coords, returns parent-space coords (i.e. parentFromEntity).

◆ donner::svg::components::ComputedLocalTransformComponent

struct donner::svg::components::ComputedLocalTransformComponent

Stores the computed local transform for an entity (after CSS cascade + percentage/viewport resolution).

Class Members
Transform2d parentFromEntity Local transform that maps entity coords to the parent's coord system. Applying parentFromEntity to a point expressed in the entity's own coord system yields its position in the parent coord system. For <rect x=0 y=0 ... transform="translate(100, 0)"/>, this matrix is Translate(100, 0), and the rect ends up at x=100 in the parent.
CssTransform rawCssTransform Raw CSS transform value, before resolving percentages relative to the viewport.
Vector2d transformOrigin Resolved transform origin in pixels.

◆ donner::svg::components::ComputedAbsoluteTransformComponent

struct donner::svg::components::ComputedAbsoluteTransformComponent

Stores the computed absolute transform for an entity - the full cascade of ancestor transforms composed together.

Class Members
Transform2d worldFromEntity Transform that maps entity-local coords through every ancestor's local transform to world (canvas) coords. This is the cascade of every parentFromEntity up the tree, composed together.
bool worldIsCanvas = true Set to false if this entity rebases the coordinate system and is not relative to the canvas (e.g. sub-document boundaries).

◆ donner::svg::components::ViewBoxComponent

struct donner::svg::components::ViewBoxComponent

A component attached to entities that have a viewBox attribute, such as <svg> and <pattern>.

Class Members
optional< Box2d > viewBox Stored viewBox, if any.

◆ donner::svg::components::ComputedViewBoxComponent

struct donner::svg::components::ComputedViewBoxComponent

Computed value of a viewBox for the current element.

If this element does not define a viewBox, this is the viewBox of the nearest ancestor or the document itself.

Class Members
Box2d viewBox The viewBox of the element, or the viewBox of the nearest ancestor.

◆ donner::svg::components::NodeExternalRefState

struct donner::svg::components::NodeExternalRefState

Shared control block retained by public SVG DOM element wrappers.

Class Members
atomic< bool > isDetached = true Fast release-path hint for collection.

◆ donner::svg::components::ClipPathComponent

struct donner::svg::components::ClipPathComponent

Parameters for the <clipPath> element.

Class Members
optional< ClipPathUnits > clipPathUnits The parsed value of the "clipPathUnits" attribute, which defines the coordinate system for the contents of the clip path.

◆ donner::svg::components::GradientComponent

struct donner::svg::components::GradientComponent

Common parameters for gradient elements, <linearGradient> and <radialGradient>.

When this component is present, either LinearGradientComponent or RadialGradientComponent must be present.

Class Members
optional< GradientUnits > gradientUnits The parsed value of the "gradientUnits" attribute, which specifies how the coordinate system for linear/radial gradient positional attributes (such as x1, y1, cx, cy). Empty if no attribute was specified.
optional< Reference > href The parsed value of the "href" attribute, which specifies a reference to a gradient element to inherit from.
optional< GradientSpreadMethod > spreadMethod The parsed value of the "spreadMethod" attribute, which specifies how the gradient is repeated on its edges (such as spread, reflect, or repeat). Empty if no attribute was specified.

◆ donner::svg::components::MarkerComponent

struct donner::svg::components::MarkerComponent

Stores the marker data for an SVG element.

Lengths are stored unresolved (Lengthd) so that percentage units - which resolve against the viewport of the element referencing the marker - are computed at render time. markerWidth/refX resolve against the viewport width (Lengthd::Extent::X) and markerHeight/refY against the viewport height (Lengthd::Extent::Y).

Class Members
Lengthd markerHeight {3.0, Lengthd::Unit::None} Height of the marker viewport.
MarkerUnits markerUnits Coordinate system for marker attributes and contents.
Lengthd markerWidth {3.0, Lengthd::Unit::None} Width of the marker viewport.
MarkerOrient orient Orientation of the marker.
Lengthd refX {0.0, Lengthd::Unit::None} X coordinate for the reference point.
Lengthd refY {0.0, Lengthd::Unit::None} Y coordinate for the reference point.

◆ donner::svg::components::PatternComponent

struct donner::svg::components::PatternComponent

Parameters for <pattern> elements which are not captured by ViewBoxComponent and SizedElementComponent.

Class Members
optional< Reference > href An optional href to another pattern, which is used to inherit properties from if not by this entity.
optional< PatternContentUnits > patternContentUnits The pattern content units of the pattern, if std::nullopt, the pattern content units are inherited from the parent or defaulted to PatternContentUnits::Default.
optional< PatternUnits > patternUnits The pattern units of the pattern, if std::nullopt, the pattern units are inherited from the parent or defaulted to PatternUnits::Default.
SizedElementProperties sizeProperties Contains the x, y, width, and height properties of the pattern tile rectangle.

◆ donner::svg::components::StopComponent

struct donner::svg::components::StopComponent

Stores the properties of a <stop> element.

Class Members
StopProperties properties The properties of the <stop> element.

◆ donner::svg::components::PathLengthComponent

struct donner::svg::components::PathLengthComponent

Stores a user-overridden path length on an element.

If the user has not overridden the path length, this component will not be attached.

Class Members
double value The user-overridden path length, in user units.

◆ donner::svg::components::PreserveAspectRatioComponent

struct donner::svg::components::PreserveAspectRatioComponent

Stores the preserveAspectRatio attribute of <svg> and <pattern>.

Class Members
PreserveAspectRatio preserveAspectRatio The preserveAspectRatio of the element, defaults to PreserveAspectRatio::None().

◆ donner::svg::components::SubtreeInfo

struct donner::svg::components::SubtreeInfo

Created on the start of a subtree, to inform the renderer about which element ends the current subtree, plus how many isolated layers need to be popped when the subtree is complete.

Class Members
Entity firstRenderedEntity Indicates the first entity within the current subtree. The renderer will continue rendering entities until it reaches this one, then it will pop restorePopDepth isolated layers from the render state.
Entity lastRenderedEntity Indicates the last entity within the current subtree. The renderer will continue rendering entities until it reaches this one, then it will pop restorePopDepth isolated layers from the render state.
int restorePopDepth = 0 How many isolated layers to pop after rendering this entity.

◆ donner::svg::components::PaintContextRemap

struct donner::svg::components::PaintContextRemap

Remap information for a paint inherited through the SVG2 context-fill / context-stroke keywords (https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint).

The inherited paint server is evaluated in the context element's user space - the <use> element for <use> shadow trees, or the shape referencing a <marker> for marker content: objectBoundingBox paint units resolve against the context element's bounding box, and the resulting paint is transformed into the consuming entity's local space.

Class Members
Box2d contextBounds Bounding box of the context element in its own user space, used to resolve objectBoundingBox paint units. May be empty (e.g. for a zero-size shape), in which case objectBoundingBox context paints fail to instantiate and render nothing.
Transform2d entityFromContextTransform Maps the context element's user space into the consuming entity's local space. When resolveAtDrawTime is set this value is not yet meaningful - the renderer driver substitutes the concrete per-placement transform before handing the paint to the backend.
bool resolveAtDrawTime = false True when entityFromContextTransform cannot be precomputed at render-tree instantiation time: the consuming entity lives in a marker's offscreen coordinate space, which is placed at multiple positions (one per path vertex) at draw time. The renderer driver resolves the concrete transform per placement.
bool seededFromStroke = false For resolveAtDrawTime remaps: identifies which of the referencing shape's paints seeded the context (false = the shape's fill, true = the shape's stroke), so the driver can chain through the shape's own context remap if its paint was itself inherited.

◆ donner::svg::components::PaintResolvedReference

struct donner::svg::components::PaintResolvedReference

Contains rendering information for a paint server, such as the subtree needed if it establishes an isolated layer, and where the paint server is located.

Class Members
optional< PaintContextRemap > contextRemap Set when this paint was inherited through context-fill / context-stroke; carries how to evaluate the paint in the context element's space. See PaintContextRemap.
optional< Color > fallback Fallback color to use if this paint fails to instantiate. This can happen for various reasons, such as if a gradient has no stops (making it invalid).
ResolvedReference reference Reference to the paint server element.
optional< SubtreeInfo > subtreeInfo If this paint server creates a subtree, such as for patterns, contains subtree info to inform the renderer how to render it.

◆ donner::svg::components::ResolvedMarkerLengths

struct donner::svg::components::ResolvedMarkerLengths

Animated marker lengths resolved once against the referencing rendering instance.

Class Members
double height = 0 Marker viewport height in user units.
double refX = 0 Reference X coordinate in the marker's chosen percentage space.
double refY = 0 Reference Y coordinate in the marker's chosen percentage space.
double width = 0 Marker viewport width in user units.

◆ donner::svg::components::SpanPatternPaint

struct donner::svg::components::SpanPatternPaint

A pattern that a text span's own fill or stroke references, other than the pattern of the instance's own fill or stroke.

Before the instance draws its text, the driver renders the pattern's tile into the span pattern slot named by its index in RenderingInstanceComponent::spanPatternPaints.

Class Members
bool forStroke = false True for a span's stroke, false for its fill.
PaintResolvedReference reference The pattern, with the tile content it renders.

◆ donner::svg::components::DeferredDecodedImageComponent

struct donner::svg::components::DeferredDecodedImageComponent

A decoded image waiting for enough recoverable document-family capacity.

Class Members
RcString href Image reference whose decode was deferred.
size_t requiredBytes = 0 Exact decoded RGBA bytes required for admission.

◆ donner::svg::components::ImageComponent

struct donner::svg::components::ImageComponent

Parameters for the <image> element.

Class Members
RcString href URI to the image resource, which can either be a file path, URL, or data URL (e.g. "data:image/png;base64,...").

◆ donner::svg::components::LoadedSVGImageComponent

struct donner::svg::components::LoadedSVGImageComponent

Loaded SVG sub-document, created from a ImageComponent when the href references an SVG file (image/svg+xml).

Stores the shared internal document handle used by SVGDocument.

Class Members
SVGDocumentHandle subDocument Parsed external SVG sub-document handle.

◆ donner::svg::components::ExternalUseComponent

struct donner::svg::components::ExternalUseComponent

Loaded external SVG sub-document referenced by a <use> element.

When a <use> element's href points to an external SVG file, the document is loaded via SubDocumentCache and stored here as an SVGDocumentHandle for rendering as a nested sub-document.

Class Members
RcString fragment Fragment identifier within the external document (e.g., "elementId" from "file.svg#elementId"). Empty if the whole document is referenced.
SVGDocumentHandle subDocument Parsed external SVG sub-document handle.

◆ donner::svg::components::ShadowEntityComponent

struct donner::svg::components::ShadowEntityComponent

A component attached to entities in the shadow tree, indicating which light entity they are mirroring.

This component exists on every shadow entity, forming a one-to-one mapping between shadow entities and light entities.

Class Members
Entity lightEntity The entity that this shadow entity is mirroring.

◆ donner::svg::components::ShadowTreeRootComponent

struct donner::svg::components::ShadowTreeRootComponent

Indicates root of an instantiated shadow tree, where the light entity is is the target of the href, e.g.

a <symbol> element.

Class Members
Entity sourceEntity The entity of the source (e.g. <use>) element that instantiated this shadow tree.

◆ donner::svg::components::BoundsGeometryPiece

struct donner::svg::components::BoundsGeometryPiece

One piece of an element's geometry and the transform that places it in a measurement space.

A path is bounded after a later transform is composed with spaceFromPiece, so its bounds stay tight however the transforms combine; a box, such as an image's or a text's, is mapped as a box.

Class Members
variant< shared_ptr< const Path >, Box2d > geometry
Transform2d spaceFromPiece Transform from the piece into the measurement space. The piece's path, shared with other pieces that hold the same path, or its box.

◆ donner::svg::components::BoundsGeometryCollector

struct donner::svg::components::BoundsGeometryCollector

Where collected geometry goes: its pieces, the shared path copies they hold, and the allowance those copies are charged to.

Class Members
StyleResourceBudget & budget Charged for new path copies.
BoundsGeometryPaths & paths Shares the pieces' path copies.
vector< BoundsGeometryPiece > & pieces Receives the pieces.

◆ donner::svg::components::CircleComponent

struct donner::svg::components::CircleComponent

Parameters for a <circle> element.

Class Members
CircleProperties properties The properties for the circle.

◆ donner::svg::components::ComputedInstanceGeometryComponent

struct donner::svg::components::ComputedInstanceGeometryComponent

Selects instance-owned geometry, including an intentionally empty or refused path.

Class Members
bool prepared = false Cleared at the next global shape preparation pass.

◆ donner::svg::components::EllipseComponent

struct donner::svg::components::EllipseComponent

Parameters for a <ellipse> element.

Class Members
EllipseProperties properties The properties of the ellipse.

◆ donner::svg::components::LineComponent

struct donner::svg::components::LineComponent

Parameters for a <line> element.

Note that unlike other elements, the x1, y1, x2, and y2 properties are not presentation attributes, so they must be specified on the element and not through CSS. This means that we don't need a ComputedLineComponent counterpart of this struct.

From https://www.w3.org/TR/SVG2/shapes.html#LineElement

A future specification may convert the , u2019:x1', , u2019:y1', , u2019:x2', and , u2019:y2' attributes to geometric properties. Currently, they can only be specified via element attributes, and not CSS.

Class Members
Lengthd x1 The x-coordinate of the start of the line.
Lengthd x2 The x-coordinate of the end of the line.
Lengthd y1 The y-coordinate of the start of the line.
Lengthd y2 The y-coordinate of the end of the line.

◆ donner::svg::components::RectComponent

struct donner::svg::components::RectComponent

Parameters for a <rect> element.

Class Members
RectProperties properties The properties of the rectangle.

◆ donner::svg::components::DoNotInheritFillOrStrokeTag

struct donner::svg::components::DoNotInheritFillOrStrokeTag

This component is added to entities to indicate that 'fill' and 'stroke' attributes should not be inherited, which is used for <pattern> because it establishes a shadow tree, and we do not want to recursively inherit 'fill' or 'stroke' values into the children.

◆ donner::svg::components::DisableMatchedPropertiesCacheForTesting

struct donner::svg::components::DisableMatchedPropertiesCacheForTesting

Context switch for comparing the cached and uncached paths on the same document.

◆ donner::svg::components::MatchedPropertiesEntry

struct donner::svg::components::MatchedPropertiesEntry

Record and paint-origin inputs needed to install one occurrence of a shared style.

Class Members
PropertyState fillState = PropertyState::NotSet
PropertyState strokeState = PropertyState::NotSet
shared_ptr< const ComputedStyle > style

◆ donner::svg::components::StylePassPhasesForTesting

struct donner::svg::components::StylePassPhasesForTesting

Test observations under the caller's document access. Per-node callbacks can be concurrent. They may synchronize the fixture but must not take a document guard or change storage.

Class Members
function< bool(Entity)> allowChildAdmission
function< void()> beforeCommit
function< void(Entity)> beforeNode
function< void()> beforeOffscreen
function< void()> beforeRegion
size_t grain = 64
size_t minimumElements = 1000 Lower the production threshold and grain to exercise scheduling on bounded fixtures.
function< void(Entity)> published
size_t rangeStackHeadroom = 0 Raise the range admission requirement to test rollback without using a small real stack.

◆ donner::svg::components::ProjectedNonWhitespaceTextTag

struct donner::svg::components::ProjectedNonWhitespaceTextTag

Non-whitespace authored text not represented by the active raw-text child view. Covers conversion pruning and typed appends after incremental source projection.

◆ donner::svg::components::SelectorRawTextAuthorityTag

struct donner::svg::components::SelectorRawTextAuthorityTag

Incremental content projection retained a complete raw-text child view for selectors.

◆ donner::svg::components::SelectorRejectedTextTag

struct donner::svg::components::SelectorRejectedTextTag

A rejected source projection leaves retained typed text authoritative.

◆ donner::svg::components::StyleCascadeMetrics

struct donner::svg::components::StyleCascadeMetrics

Style cascade instrumentation kept in a document registry's context by the style system.

Class Members
uint64_t abandonedStylePasses = 0 Attempted preparations whose owner fell back to serial matching.
int activeTimedCalls = 0 Style calls currently timed on this registry, so nested calls are not timed twice.
uint64_t admittedStyleTasks = 0 Tasks admitted to the flat style scope.
StyleCascadeCounters counters Exact work counts.
uint64_t declinedStyleTasks = 0 Ready ranges processed inline after the scheduler declined a spawn.
uint64_t preparedWarningPhases = 0 Nonempty per-element warning phases emitted from matching worker buffers.
uint64_t replayedSelectorTraces = 0 Accepted worker selector traces over scheduled passes.
uint64_t reusedCanonicalHits = 0 Canonical hits served by an unchanged, already-referenced clock entry.
uint64_t scheduledPasses = 0 Large static passes dispatched to a scheduler.
nanoseconds styleTime {0} Wall-clock time inside the outermost whole-document and entity-list style calls. Unlike counters it varies between runs and machines, and a single entity's style computed outside those calls is counted in counters but not timed.

◆ donner::svg::components::CascadeAncestorFilters

struct donner::svg::components::CascadeAncestorFilters

A document may install a provider to create an independent filter for each executing context. An absent provider, or a null result, selects ordinary matching. Creation must be safe across independent document preparations. Each filter runs on its bound thread and can be destroyed on the pass owner after the join.

Class Members
function< unique_ptr< CascadeAncestorFilter >(const Registry &, StyleCascadeCounters &)> create
size_t maximumBytesPerWorker = 0 Conservative size of one filter's object and retained scratch. Charged before construction.

◆ donner::svg::components::UnindexedCascadeForTesting

struct donner::svg::components::UnindexedCascadeForTesting

Test-only switch: while a registry's context holds this, the cascade and StyleSystem::collectMatchedStyleRules test every rule of every applicable stylesheet against every element instead of only the rule index's candidates.

Differential tests compare the two; nothing else changes, so any difference is a rule the index wrongly skipped.

◆ donner::svg::components::UnfilteredCascadeForTesting

struct donner::svg::components::UnfilteredCascadeForTesting

Runs the ordinary cascade without its ancestor filter for differential comparisons.

◆ donner::svg::components::StylesheetEditScanLimitsForTesting

struct donner::svg::components::StylesheetEditScanLimitsForTesting

Test-only rule-to-element allowance for the old-and-new stylesheet edit scan.

Class Members
size_t ruleElementMatches Maximum selector-rule and element pairs to inspect.

◆ donner::svg::components::CustomPropertyDeclarationBatchResult

struct donner::svg::components::CustomPropertyDeclarationBatchResult

Internal result of one aggregate custom-property provenance query.

Class Members
bool budgetExceeded = false
bool complete = false
vector< optional< SourceRange > > declarations
size_t work = 0

◆ donner::svg::components::StylesheetImportOrigin

struct donner::svg::components::StylesheetImportOrigin

Identifies a successful import occurrence in an imports-first flattened list.

Class Members
size_t importIndex Index in the importing sheet's retained import stream.
optional< size_t > parentEntry Flattened parent, or the root stylesheet.

◆ donner::svg::components::TypedFilterAttributeEdit

struct donner::svg::components::TypedFilterAttributeEdit
Class Members
optional< ParseDiagnostic > diagnostic The edited attribute's parse error or warning, if its value did not parse.
bool typed = false Whether the edited attribute is one of the element's type-specific attributes.

◆ donner::svg::components::ComputedTextComponent

struct donner::svg::components::ComputedTextComponent

Pre-computed layout information for a text subtree.

A ComputedTextComponent is attached by the layout system to the root <text> element after all <text>, <tspan>, and <textPath> descendants have been resolved. It stores the final, absolute positions for each contiguous slice of text, allowing the renderer to iterate quickly without re-evaluating attribute vectors on every frame.

The component contains a single public field, spans, which is the computed list of text spans.

Note
This structure is internal to the rendering pipeline and is not exposed through the public DOM API.
Class Members
unordered_map< entity, OwnerSpanRange > ownerSpanRanges Contiguous computed-span range covered by each authored text owner.
bool spanPatternSlotsAssigned = false True when some span holds a TextSpan::fillPatternSlot or TextSpan::strokePatternSlot, so a draw that stages no span pattern has to clear them.
SmallVector< TextSpan, 1 > spans
unordered_map< entity, Lengthd > textLengthOwnerFontSizes One occurrence-resolved font size per authored text owner.

◆ donner::svg::components::ComputedTextGeometryComponent

struct donner::svg::components::ComputedTextGeometryComponent

Cached geometry for text layout and text-derived public API queries.

Attached to the root <text> entity and populated from the shared text engine. This stores per-glyph outlines and per-character metrics so DOM APIs can answer geometry queries without duplicating text layout logic.

Class Members
vector< CharacterGeometry > characters Cached character metrics in logical order.
Box2d emBoxBounds Union of em-box bounds used for text bbox.
vector< FontFaceDependency > fontDependencies Faces used to compute these runs, including pending fallback resolutions. A second root keeps its own dependency even when the manager reused an existing face lookup.
uint64_t fontResourceRevision = 0 Font resolution revision used for this geometry. FontManager::hostFontKey when this was prepared; a different key makes it stale.
vector< GlyphGeometry > glyphs Cached glyph outlines for the text root.
uint64_t hostFontKey = 0
Box2d inkBounds Union of glyph ink bounds.
unordered_map< entity, Box2d > objectBoundsByEntity Glyph-cell bounds by text content entity subtree, built once per text root.
bool retryAfterTextPathWorkRejection = false Retry in a fresh preparation/query epoch.
vector< TextRun > runs Cached layout runs for renderer reuse.

◆ donner::svg::components::TextComponent

struct donner::svg::components::TextComponent

Defines the start of a text element, which may have other text elements as children.

Created on each <text>, <tspan>, and <textPath> element.

Class Members
LengthAdjust lengthAdjust = LengthAdjust::Default How to adjust the text length, either by adding spacing between glyphs or stretching the glyphs themselves.
RcString text Text content.
SmallVector< RcString, 1 > textChunks Direct text chunks between child elements, in DOM order.

Chunk 0 is the text before the first child element, chunk 1 is the text between the first and second child elements, and so on. Empty chunks are preserved so mixed text and element content can be reconstructed in order during layout.

optional< Lengthd > textLength Override for the text length. If empty, the property is not set.

◆ donner::svg::components::TextPathComponent

struct donner::svg::components::TextPathComponent

Stores attributes specific to <textPath> elements.

The <textPath> element renders text along a path given either inline with the path attribute or by reference through href.

Class Members
RcString href Reference to a shape element (IRI fragment, e.g., "#myPath").
optional< Path > inlinePath Geometry parsed from the path attribute, in the textPath element's own user space. Set only when the attribute parsed to at least one subpath; an unparsable value leaves this empty so that href supplies the geometry instead.
TextPathMethod method = TextPathMethod::Align How glyphs are placed on the path.
TextPathSide side = TextPathSide::Left Which side of the path to render text.
TextPathSpacing spacing = TextPathSpacing::Exact Spacing control.
optional< Lengthd > startOffset Offset along the path where text begins. Percentages are relative to path length.

◆ donner::svg::components::TextPositioningComponent

struct donner::svg::components::TextPositioningComponent

Defines the positioning of a text element, which may have other text elements as children.

Created on each <text> and <tspan> element.

Class Members
SmallVector< Lengthd, 1 > dx Relative shift in x for each character. If empty, the property is not set.
SmallVector< Lengthd, 1 > dy Relative shift in y for each character. If empty, the property is not set.
SmallVector< double, 1 > rotateDegrees Rotation in degrees for each character. If empty, the property is not set.
SmallVector< Lengthd, 1 > x X coordinate for each character. If empty, the property is not set.
SmallVector< Lengthd, 1 > y Y coordinate for each character. If empty, the property is not set.

◆ donner::svg::components::TextRootComponent

struct donner::svg::components::TextRootComponent

Defines the start of a text element, which may have other text elements as children.

Created on each <text> element.

◆ donner::svg::components::TinySkiaPathCacheComponent

struct donner::svg::components::TinySkiaPathCacheComponent

Per-entity cache of a shape's donner::Path converted to tiny_skia::Path.

Installed lazily at the draw call sites via get_or_emplace, keyed by PathShape::sourceEntity; removed by the ComputedPathComponent listener when the geometry changes or the entity goes away. A null source entity (overlay drawing, test harnesses) is not cached and converts inline, exactly as before the cache existed.

Lives in donner::svg::components, alongside ComputedPathComponent and every other component it derives from, rather than in a backend-private namespace. (Geode's equivalent sits in donner::geode instead, to match the other Geode types its renderer references unqualified; the tiny-skia backend has no such namespace and already spells its component dependencies components::.)

Class Members
optional< Path > closedPath Conversion that preserves ClosePath verbs. Used by fills and by every ordinary stroke.
optional< Transform2d > hostFromLocal The element-to-host transform the two host-space slots were built from. Part of their key: the entity-level invalidation only watches the spline, so a transform-only attribute write, a canvas resize, or a second <use> instance in the same frame would otherwise be served the previous CTM's geometry.
optional< Path > hostSpaceClosedPath Conversion of a vector-effect: non-scaling-stroke centerline transformed into host space. Kept apart from closedPath because the same entity's local-space geometry is also converted for its fill, and the two must never be served for each other. The second slot mirrors openedPath for the dash-seam conversion.
optional< Path > hostSpaceOpenedPath
optional< Path > openedPath Conversion that replaces each ClosePath with an explicit closing line. Used only by the dash-stroke path that has to emit caps at a closed contour's seam, so it is filled in on demand rather than alongside closedPath.

◆ donner::svg::components::TinySkiaImageCacheComponent

struct donner::svg::components::TinySkiaImageCacheComponent

Per-entity cache of a LoadedImageComponent's pixels converted from the straight-alpha ImageResource contract to the premultiplied form tiny-skia samples.

Installed lazily by drawImage via get_or_emplace, keyed by ImageParams::sourceEntity; removed by the LoadedImageComponent listener when the element loads different pixels or goes away. The dimensions are stored alongside the payload and rechecked on every hit, so a draw whose source no longer matches the cached buffer reconverts instead of sampling the wrong extent.

Residency tradeoff: the cached payload is a second full copy of the element's decoded pixels and there is no eviction, so a drawn image stays doubled in resident bytes for as long as the document holds it. That is bounded by the images the document actually draws (an undrawn or removed image holds nothing), and it buys a full-buffer conversion pass and allocation per image per frame; a document with a large enough image working set to care would need an eviction policy this cache deliberately does not have.

See also
TinySkiaPathCacheComponent for the namespace-placement rationale.
Class Members
int height = 0 Height the payload was converted at, in pixels.
vector< uint8_t > premultiplied Premultiplied RGBA8, tightly packed.
int width = 0 Width the payload was converted at, in pixels.

◆ donner::svg::components::MissingFallbackFontReported

struct donner::svg::components::MissingFallbackFontReported

Registry context marker: the document's missing packaged fallback font was already reported.

◆ donner::svg::components::RetainedUpdatePlan

struct donner::svg::components::RetainedUpdatePlan

The work a retained update performs, collected while checking that a frame's dirty set qualifies for one.

A dirty set qualifies when every change only moves content (a transform write), changes how it is composited (an opacity write), points an external <use> at another external instance, or only requires an element to redraw content it draws through a reference (an feImage of a moved element). None of these changes any input of the computed styles of other elements, the shadow trees, the computed paths, text layout, paint servers or filter graphs, so those are kept, and the render instances are rebuilt from them. Anything else, or any case where one of these changes could reach a computed component (for example a moved element that a shadow tree clones, or that a <textPath> follows), takes the full rebuild.

Class Members
vector< Entity > layoutEntities Entities whose computed layout was dropped by a transform write.
bool restyle = false Whether any entity needs its style recomputed through the selective style pass.
vector< Entity > retargetedUses External <use> elements that were retargeted to another external instance.

Typedef Documentation

◆ FilterPrimitive

Initial value:
Parameters for feDiffuseLighting.
Definition FilterGraph.h:635
Parameters for feDropShadow.
Definition FilterGraph.h:303
Parameters for feFlood.
Definition FilterGraph.h:229
Parameters for feMerge. Children are represented as additional inputs on the FilterNode.
Definition FilterGraph.h:300
Parameters for feOffset.
Definition FilterGraph.h:235
Parameters for feSpecularLighting.
Definition FilterGraph.h:643
Parameters for feTile.
Definition FilterGraph.h:505
Parameters for feBlend.
Definition FilterGraph.h:241
Parameters for feColorMatrix.
Definition FilterGraph.h:286
Parameters for feComponentTransfer.
Definition FilterGraph.h:313
Parameters for feComposite.
Definition FilterGraph.h:266
Parameters for feConvolveMatrix.
Definition FilterGraph.h:341
Parameters for feDisplacementMap.
Definition FilterGraph.h:601
Parameters for feGaussianBlur.
Definition FilterGraph.h:215
Parameters for feImage.
Definition FilterGraph.h:524
Parameters for feMorphology.
Definition FilterGraph.h:492
Parameters for feTurbulence.
Definition FilterGraph.h:508

Variant holding any filter primitive type.

◆ ResolvedPaintServer

Initial value:
std::variant<PaintServer::None, PaintServer::Solid, PaintResolvedReference>

The resolved paint server for a fill or stroke.

◆ ShadowSizedElementHandler

Initial value:
std::function<bool(
Registry& registry, Entity shadowEntity, EntityHandle useEntity, Entity symbolEntity,
ShadowBranchType branchType, ParseWarningSink& warningSink)>
Collects parse warnings during parsing.
Definition ParseWarningSink.h:30
ShadowBranchType
There are two types of shadow trees:
Definition ShadowBranch.h:22
entt::basic_registry< Entity > Registry
Registry type for the SVG ECS, which is the entry point for storing all data.
Definition EcsRegistry.h:52
entt::entity Entity
Entity type for the Registry, a std::uint32_t alias.
Definition EcsRegistry.h:22
entt::basic_handle< Registry > EntityHandle
Convenience handle for a Entity with an attached Registry.
Definition EcsRegistry.h:59

Type definition for a callback to process sized elements.

This allows systems that can't directly depend on LayoutSystem to request sized element processing.

Parameters
registryECS registry.
shadowEntityThe shadow entity to create a computed component for.
useEntityThe source <use> that may provide size override.
symbolEntityThe target <symbol> entity whose properties might be overridden.
branchTypeThe type of branch being created.
warningSinkOutput vector of parse errors, if any.
Returns
true if a component was created, false otherwise.

◆ StylesheetImportFetch

Initial value:
std::function<std::variant<UrlLoader::Result, RcString>(
std::string_view url, std::size_t maximumBytes)>

Fetch callback for one resolved import URL: returns the loaded bytes, or a diagnostic reason (which must not contain the URL) when the resource is refused or unavailable.

The callback receives the maximum number of bytes this import may still use, so oversized responses can be rejected before they are retained.

Enumeration Type Documentation

◆ AnimationCollectionMode

System that advances SVG animations based on the current document time.

Runs after style computation but before layout, so that animated property values are applied before layout-dependent computations.

For each animation entity:

  1. Resolves the target entity (from href or parent).
  2. Computes timing: determines if the animation is before/active/after.
  3. For active <set> animations, stores the override value on the target entity.
  4. For frozen animations (fill="freeze"), persists the final value.
  5. For removed animations (fill="remove"), clears the override. Whether declaration collection may retire excluded animation sessions.
Enumerator
ReadOnly 

Preserve runtime state for read-side queries.

DiscardExcludedState 

Requires write access; discard sessions outside the SVG namespace.

◆ AnimationFill

enum class donner::svg::components::AnimationFill : uint8_t
strong

Fill behavior when an animation finishes.

Enumerator
Remove 

Revert to base value when the animation ends.

Freeze 

Persist the final animation value.

◆ AnimationPhase

enum class donner::svg::components::AnimationPhase : uint8_t
strong

Phase of an animation element's lifecycle.

Enumerator
Before 

Document time is before the animation's begin time.

Active 

Animation is currently active.

After 

Animation has finished its active duration.

◆ AnimationRestart

enum class donner::svg::components::AnimationRestart : uint8_t
strong

Restart behavior for an animation.

Enumerator
Always 

Can always restart.

WhenNotActive 

Can only restart when not active.

Never 

Cannot restart.

◆ CalcMode

enum class donner::svg::components::CalcMode : uint8_t
strong

How keyframe values are sampled over time.

Enumerator
Discrete 

Hold a value until the next key time.

Linear 

Linear interpolation between keyframes.

Paced 

Constant speed according to value distances.

Spline 

Cubic Bezier timing between keyframes.

◆ FilterMemoryModel

enum class donner::svg::components::FilterMemoryModel : std::uint8_t
strong

Intermediate-retention behavior used to estimate backend memory before filter execution.

Enumerator
CpuFloatNamedResults 

TinySkia retains named float RGBA results (16 bytes per pixel).

GpuAllNodes 

Geode retains live float values and reusable node scratch.

◆ FilterStandardInput

enum class donner::svg::components::FilterStandardInput : std::uint8_t
strong

Standard named inputs available to filter primitives.

See also
https://drafts.fxtf.org/filter-effects/#FilterPrimitiveSubRegion
Enumerator
SourceGraphic 

The original element rendering.

SourceAlpha 

Alpha channel of SourceGraphic (RGB = 0).

FillPaint 

The element's fill paint, conceptually infinite.

StrokePaint 

The element's stroke paint, conceptually infinite. The backdrop beneath the filtered element: what its nearest isolation group painted before it, clipped by the filter region.

BackgroundAlpha 

Alpha channel of BackgroundImage (RGB = 0).

◆ RenderingBehavior

Controls how the attached element is rendered, determines how different element types are rendered.

Enumerator
Default 

The default rendering behavior, which renders and traverses children.

Nonrenderable 

The element and its children are not rendered.

NoTraverseChildren 

The element is rendered, but its children are not traversed.

ShadowOnlyChildren 

Only traverse this element's children within a shadow tree instantiation.

◆ ShadowBranchType

There are two types of shadow trees:

  • Main: One for elements in the main render graph, such as <use> elements, where each <use> element holds one instantiation, which behaves as if the referenced element was copy-pasted within the tree.
  • Offscreen: Shadow trees for paint servers and offscreen purposes, which are not enumerated as part of the render graph. For example, a 'fill' attribute may reference a <pattern> paint server, which needs to be rendered into a buffer before being tiled into the main render graph.

Shadow trees always belong to specific branches, and there are no multiples; there are a finite number of branches. To enable this, list each branch individually, with everything except Main being an offscreen branch.

Enumerator
Main 

For entities enumerated in the main render graph.

OffscreenFill 

For 'fill' attributes.

OffscreenStroke 

For 'stroke' attributes.

OffscreenMask 

For mask contents, used for the 'mask' attribute.

OffscreenMarkerStart 

For the 'marker-start' attribute.

OffscreenMarkerMid 

For the 'marker-mid' attribute.

OffscreenMarkerEnd 

For the 'marker-end' attribute.

OffscreenFeImage 

For feImage fragment references.

◆ TextPathMethod

Method for placing glyphs along a path in <textPath>.

Enumerator
Align 

Each glyph is rigidly rotated and translated onto the path tangent.

Stretch 

Glyph outline endpoints and control points follow the path's perpendiculars.

◆ TextPathSide

Which side of the path to render text in <textPath>.

Enumerator
Left 

Text rendered on the left side (default).

Right 

Text rendered on the other side, by reversing the direction of travel.

◆ TextPathSpacing

Spacing mode for <textPath>.

Enumerator
Auto 

The user agent chooses the inter-glyph spacing. Donner chooses the same spacing as TextPathSpacing::Exact.

Exact 

Glyphs advance by exactly their shaped widths.

◆ TransformAnimationType

Transform type for <animateTransform>.

Enumerator
Translate 

translate(tx [ty])

Scale 

scale(sx [sy])

Rotate 

rotate(angle [cx cy])

SkewX 

skewX(angle)

SkewY 

skewY(angle)

Function Documentation

◆ AcceptSelectorTextValueProjection()

void donner::svg::components::AcceptSelectorTextValueProjection ( EntityHandle parent)

Accept a value-only edit without inferring a complete raw view from attached text deltas.

Parameters
parentElement whose typed value projection succeeded.

◆ AnimatedFilterListCapacity()

std::size_t donner::svg::components::AnimatedFilterListCapacity ( std::string_view name)
constexpr

The most numbers an animated filter number list keeps: one more than the attribute's structural limit, so a longer list is still over the limit and fails closed like the authored value, while the rest of it is never read.

Parameters
nameAnimated attribute name.
Returns
The count for values, kernelMatrix and tableValues; zero for other attributes.

◆ AnimationContextFor()

AnimationValueContext donner::svg::components::AnimationContextFor ( Registry & registry,
Entity target,
std::string_view attribute,
AnimationResourceBudget & budget )

Resolve units and colors for an animation target.

Parameters
registryDocument storage.
targetAnimation target.
attributeAnimated attribute name.
budgetShared budget for resolving inherited coordinate units.
Returns
The target's current unit and color context.

◆ AnimationReferenceValue()

std::optional< RcString > donner::svg::components::AnimationReferenceValue ( Registry & registry,
Entity target )

Read the current typed resource reference, falling back to attributes for other elements.

Parameters
registryDocument storage.
targetReference-bearing element.
Returns
Owning reference value, or nullopt when unset.

◆ AnimationValueDistance()

std::optional< double > donner::svg::components::AnimationValueDistance ( std::string_view first,
std::string_view second,
const AnimationValueContext & context )

Compute the paced distance between compatible values.

Parameters
firstFirst value.
secondSecond value.
contextRelative unit and color context.
Returns
Distance, or nullopt when no distance function is defined.

◆ ApplyAnimationAttributes()

bool donner::svg::components::ApplyAnimationAttributes ( Registry & registry)

Apply sampled paint/filter attributes with bounded restoration storage.

Parameters
registryDocument storage.
Returns
False if restoration storage exceeds the animation output budget.

◆ ApplyAnimationPresentation()

void donner::svg::components::ApplyAnimationPresentation ( Registry & registry)

Sample animation and apply reversible style, geometry, and transform presentation values.

Parameters
registryDocument storage, held with write access by render preparation.

◆ ApplyAnimationReferences()

bool donner::svg::components::ApplyAnimationReferences ( Registry & registry)

Apply sampled resource references before shadow-tree expansion and resource loading.

Parameters
registryDocument storage with sampled animation values.
Returns
False if restoration storage exceeds the shared animation budget.

◆ ApplyLiveStyleUpdate()

bool donner::svg::components::ApplyLiveStyleUpdate ( Registry & registry,
ParseWarningSink & warningSink,
StylePassScheduler scheduler )
nodiscard

Apply the live style portion of a retained update.

Live DOM edits install this callback.

Parameters
registryDocument registry.
warningSinkDestination for accepted diagnostics.
schedulerScheduler available to the style pass.
Returns
False if the frame requires the full render-tree rebuild.

◆ ApplyPaintAnimationStyles()

void donner::svg::components::ApplyPaintAnimationStyles ( const Registry & registry,
AnimationResourceBudget * animationBudget,
Entity source,
const ComputedStyleComponent * parent,
bool inheritPaint,
PropertyRegistry & properties )

Sample paint and color stacks with the final instance's parent and current color.

Parameters
animationBudgetContextual animation allowance for a serial cascade, or null for static content.
registryTarget document.
sourceSource element holding animation recipes.
parentFinal computed parent, or null for the root.
inheritPaintWhether the parent permits fill/stroke inheritance.
propertiesLocal cascade, updated only by admitted, valid animation values.

◆ ApplyRetainedUpdate()

void donner::svg::components::ApplyRetainedUpdate ( Registry & registry,
const RetainedUpdatePlan & plan,
ParseWarningSink & warningSink,
StylePassScheduler scheduler = {} )

Bring the computed components of registry up to date for a frame planned by PlanRetainedUpdate.

The render instances are rebuilt afterwards, from the updated components.

Parameters
registryDocument registry.
planThe plan returned by PlanRetainedUpdate for the current dirty set.
warningSinkSink to collect warnings.
schedulerScheduler available for the style pass.

◆ ApplyScalarAnimationStyles()

ComputedResourceOpacities donner::svg::components::ApplyScalarAnimationStyles ( const Registry & registry,
AnimationResourceBudget * animationBudget,
Entity dataEntity,
const ComputedStyleComponent * parent,
PropertyRegistry & properties,
StyleResourceBudget & budget,
ParseWarningSink & warnings )

Resolve scalar animation stacks and resource opacities in the final instance cascade.

Parameters
animationBudgetContextual animation allowance for a serial cascade, or null for static content.
registryDocument storage with write access held.
dataEntityAuthored data source, including for shadow instances.
parentCompleted parent style, or null for the root.
propertiesLocally cascaded properties, updated at animation priority.
budgetShared style work budget.
warningsReceives invalid resource-style diagnostics.
Returns
Canonical resource opacity values for this instance.

◆ AttachExternalUse()

void donner::svg::components::AttachExternalUse ( Registry & registry,
Entity entity,
const RcString & href,
ParseWarningSink & warningSink )

Give an external <use> the document its reference names, as an ExternalUseComponent.

The document is admitted to the resource family once per full rebuild, and again when the document's families change, see ResourceManagerContext::loadAdmittedExternalSVG. A refused admission removes any instance the use already had.

Parameters
registryDocument registry.
entityThe <use> element.
hrefThe use's external reference.
warningSinkSink to collect warnings.

◆ BaseAnimationValue()

std::optional< std::string > donner::svg::components::BaseAnimationValue ( Registry & registry,
Entity target,
std::string_view attribute,
const AnimationValueContext & context,
AnimationResourceBudget & budget )

Read the authored or styled base value without a lower animation override.

Parameters
registryDocument storage.
targetAnimation target.
attributeAnimated attribute name.
contextResolved target context.
budgetShared source budget.
Returns
Owning serialized base value, or nullopt when unavailable/refused.

◆ BoundGeometryPieces()

std::optional< Box2d > donner::svg::components::BoundGeometryPieces ( std::span< const BoundsGeometryPiece > pieces,
const Transform2d & targetFromSpace )

Bounds of pieces after targetFromSpace maps their measurement space into a target space, or nothing when there are no pieces or a bound is not finite.

Parameters
piecesGeometry collected in one measurement space.
targetFromSpaceTransform from the measurement space to the target space.

◆ CascadedAnimationPathData()

std::optional< RcString > donner::svg::components::CascadedAnimationPathData ( Registry & registry,
Entity target,
AnimationResourceBudget & budget )

Resolve typed, animated and CSS path data using the rendering cascade.

Parameters
registryDocument storage.
targetPath element.
budgetShared admission.
Returns
Owning path data, or nullopt on admission refusal.

◆ CollectAnimationEntities()

std::vector< Entity > donner::svg::components::CollectAnimationEntities ( Registry & registry,
AnimationCollectionMode mode = AnimationCollectionMode::ReadOnly )

Collect attached animation declarations in document order.

Parameters
registryDocument storage.
modeRead-only query or write-side session cleanup.
Returns
Bounded declaration list, including one overflow entry when rejected.

◆ CombineAnimationValues()

std::optional< std::string > donner::svg::components::CombineAnimationValues ( std::string_view first,
std::string_view second,
double firstWeight,
double secondWeight,
const AnimationValueContext & context,
bool secondIsOffset = false )

Combine compatible numeric, length-list, or color values with linear weights.

Parameters
firstFirst value.
secondSecond value.
firstWeightMultiplier of the first value.
secondWeightMultiplier of the second value.
contextRelative unit and color context.
secondIsOffsetTreat the second length operand as an additive displacement.
Returns
Serialized result, or nullopt for incompatible/discrete values.

◆ CompleteSelectorContentProjection()

void donner::svg::components::CompleteSelectorContentProjection ( EntityHandle parent,
bool contentsReparsed )

Complete a successful content-projection pass, preserving attribute-only summaries.

Parameters
parentElement whose content is being projected.
contentsReparsedTrue only when authored content was replaced from a new XML parse.

◆ ComputeGpuFilterWorkingSet()

bool donner::svg::components::ComputeGpuFilterWorkingSet ( const FilterGraph & graph,
GpuFilterWorkingSet & result )
inline

Derives a byte-format-aware bound without allocating or changing the CPU filter model.

Parameters
graphOrdered filter graph.
resultReceives the resource layout on success.

◆ ContextualLengthFor()

std::shared_ptr< const ContextualLengthRecipe > donner::svg::components::ContextualLengthFor ( Registry & registry,
Entity target,
std::string_view attribute )

Find an owning contextual recipe, following a shadow entity to its authored source.

Parameters
registryDocument storage.
targetTarget instance.
attributeLength field.

◆ EvaluateConditionalProcessing() [1/2]

bool donner::svg::components::EvaluateConditionalProcessing ( const ConditionalProcessingComponent & conditional)

Overload of EvaluateConditionalProcessing that uses the default user language list of {"en"}, matching resvg's default (the resvg-test-suite goldens are rendered with it).

Parameters
conditionalConditional-processing attribute values to evaluate.
Returns
true if all present attributes evaluate to true (the element may render).

◆ EvaluateConditionalProcessing() [2/2]

bool donner::svg::components::EvaluateConditionalProcessing ( const ConditionalProcessingComponent & conditional,
std::span< const RcString > userLanguages )

Evaluates an element's conditional-processing attributes.

Matches resvg's evaluation rules so rendering agrees with the resvg-test-suite goldens:

  • requiredFeatures always evaluates to true (deprecated in SVG2, ignored).
  • requiredExtensions evaluates to true only when empty (no extensions are supported).
  • systemLanguage evaluates to true if any comma-separated tag equals a user language or is a sub-tag of it (e.g. both "en" and "en-GB" match the default user language "en").
Parameters
conditionalConditional-processing attribute values to evaluate.
userLanguagesUser's preferred languages, in priority order (see SVGDocument::setUserLanguages). A systemLanguage value matches if any of these languages matches per SystemLanguageMatches. An empty list disables all systemLanguage matches. <switch> child selection ranks by priority instead; see SystemLanguageMatchRank.
Returns
true if all present attributes evaluate to true (the element may render).

◆ FilterGraphExecutionCost()

bool donner::svg::components::FilterGraphExecutionCost ( const FilterGraph & graph,
std::uint64_t pixelCount,
FilterMemoryModel memoryModel,
std::uint64_t & workUnitsOut,
std::uint64_t & intermediateBytesOut,
std::uint64_t memoryPixels = UINT64_MAX,
std::uint64_t executions = 1 )
inline

Estimate a filter graph's aggregate execution cost for a pixel surface.

This rejects attacker-controlled graphs before allocating per-node buffers or starting convolution loops. The estimate is intentionally conservative: GPU primitives may need up to reusable float working textures, while the CPU backend retains every named float result.

Parameters
graphOrdered graph.
pixelCountTotal pixels visited, including repeated halos.
memoryModelBackend retention model.
workUnitsOutReceives bounded work.
intermediateBytesOutReceives allocation-byte bound, excluding caller-owned captures.
memoryPixelsWorking surface pixels; defaults to pixelCount for untiled execution.
executionsRepetitions sharing working textures but consuming distinct parameter slots.

◆ FinalizeAnimationReferences()

void donner::svg::components::FinalizeAnimationReferences ( Registry & registry)

Invalidate derived resources only when the final sampled reference changed. Call during a full rebuild, after old shadow instances have been torn down.

Parameters
registryDocument storage with write access held.

◆ FindAnimationReference()

Entity donner::svg::components::FindAnimationReference ( Registry & registry,
std::string_view id,
AnimationResourceBudget & budget )

Resolve an attached animation reference with bounded document traversal.

Parameters
registryDocument storage.
idReferenced ID, without a fragment prefix.
budgetShared sample or event allowance. Rejection is sticky.
Returns
Attached entity, or null for a missing ID or rejected lookup. Inspect budget.rejected() to distinguish exhaustion from an ordinary missing reference.

◆ FindAttachedEntityById()

Entity donner::svg::components::FindAttachedEntityById ( Registry & registry,
const RcString & id )

Finds an attached document-tree entity with the given ID.

Uses SVGDocumentContext's ID map as the fast path. If that map points to a detached or stale entity, falls back to a document-order tree scan so detached-but-held duplicate IDs do not mask an attached element.

Parameters
registryDocument registry.
idID to resolve.
Returns
The attached entity with id, or entt::null when none exists.

◆ ForgetMissingFallbackFontReport()

void donner::svg::components::ForgetMissingFallbackFontReport ( Registry & registry)

Let the next render-tree preparation of the document report a missing packaged fallback font again, by removing its MissingFallbackFontReported marker, for a caller that discarded the earlier report.

The report is otherwise made once per document.

Parameters
registryDocument registry.

◆ GpuConvolveKernelBytes()

std::uint64_t donner::svg::components::GpuConvolveKernelBytes ( const FilterPrimitive & primitive)
inline

Bytes of the separate kernel upload a Geode convolution makes beside its parameter block; zero for other primitives and for a kernel over the limit, which is refused without an upload.

Parameters
primitivePrimitive whose upload is measured.

◆ GpuFilterParameterAllocationBound()

std::uint64_t donner::svg::components::GpuFilterParameterAllocationBound ( std::uint64_t requested)
inline

Bounds new fixed-block allocations, including a partially filled starting block.

Parameters
requestedConservative byte demand including aligned-slot padding.

◆ HasConditionalProcessingAttributes()

bool donner::svg::components::HasConditionalProcessingAttributes ( const ConditionalProcessingComponent & conditional)

Return true if any conditional-processing attribute is still present on conditional.

Parameters
conditionalComponent to inspect.
Returns
true if any conditional-processing field is present.

◆ HasPaint()

bool donner::svg::components::HasPaint ( const ResolvedPaintServer & paint)
inline

Returns true if the paint server is not a PaintServer::None.

Parameters
paintThe paint server to check.
Returns
True if the paint server is not a PaintServer::None.

◆ InsertAnimationInstance()

bool donner::svg::components::InsertAnimationInstance ( std::vector< double > & times,
double time )

Retain a finite event instance time, without discarding earlier intervals.

Parameters
timesSorted runtime instance times.
timeNew instance time.
Returns
Whether a new instance was retained.

◆ InvalidateAnimatedText()

void donner::svg::components::InvalidateAnimatedText ( Registry & registry,
Entity entity )

Invalidate animation-derived text caches when an animated text field changes.

Parameters
registryDocument storage.
entityEntity whose text-related animation inputs changed.

◆ InvalidateFontResourcePreparation()

void donner::svg::components::InvalidateFontResourcePreparation ( Registry & registry)

Advance the document's font-preparation epoch so cached dependency evidence is rebuilt.

Parameters
registryDocument registry whose preparation state changed.

◆ InvalidateReferenceDependents()

void donner::svg::components::InvalidateReferenceDependents ( Registry & registry)

Mark the elements that draw a changed element through a reference, so the next frame redraws them as well as the changed element:

  • The text root of a <textPath> whose path changed drops its layout, see InvalidateTextLayout.
  • An element whose filter, or one url() stage of its filter list, draws a changed element or a changed descendant of it through an <feImage> fragment reference is marked DirtyFlagsComponent::ReferencedContent, which redraws it without recomputing its own components. Filters that take their primitives from such a filter through href count too.
  • An element clipped or masked by a <clipPath> or <mask> whose content draws a changed element is marked DirtyFlagsComponent::ReferencedContent as well. The content draws it when it holds the element, or a <use> that copies the element or an ancestor of it, directly or through a chain of <use> copies. A clip path or mask also draws what it clips or masks its own content by, through clip-path and mask.

A marked element is itself a change for the feImage, <use>, clip path and mask references.

A change is a DirtyFlagsComponent left by a DOM edit. A text path is relaid out for a change that can move its path: a shape, layout or transform write on the path, or any restyle that reaches the path other than a compositing one, including one from an ancestor. An ancestor's transform and compositing changes do not count. A <use> copy is placed by the <use>, so an element moved only by its ancestor's transform does not change a copy of it. Only the referencing elements are marked, so a renderer that redraws by dirty element (such as the compositor) redraws just them. The walk reaches each element once, so its cost stays linear in the elements and references it reaches, and reference cycles end it. The map from elements to the <use> copies a clip path or mask can draw is built only once the walk reaches an element with an id, and is kept across frames until the document is rebuilt as a whole. Call this before the dirty set is read, each frame; it does nothing when nothing is dirty.

Parameters
registryDocument registry.

◆ InvalidateTextLayout()

Entity donner::svg::components::InvalidateTextLayout ( EntityHandle handle)

Drop the cached text layout of the text root enclosing handle.

ComputedTextGeometryComponent is a memoized layout derived from the text root's computed style, text content, and positioning attributes. Both renderers draw straight out of it, so any mutation that can change one of those inputs must drop it or the old glyphs keep rendering.

Walks up from handle until it finds the TextRootComponent, so it is safe to call with a <tspan>, <textPath>, or the <text> root itself. Calling it on an entity outside any text subtree is a no-op.

Parameters
handleElement whose enclosing text root should be invalidated.
Returns
The text root entity that was invalidated, or entt::null if handle is not inside a text subtree.

◆ IsAnimationInSvgNamespace()

bool donner::svg::components::IsAnimationInSvgNamespace ( Registry & registry,
Entity entity )

Check that an element and its ancestors resolve to the SVG namespace.

Parameters
registryDocument storage.
entityElement to validate.
Returns
False for foreign, unbound-prefix, or excessively deep ancestry.

◆ IsConditionalProcessingAttribute()

bool donner::svg::components::IsConditionalProcessingAttribute ( const xml::XMLQualifiedNameRef & name)

Return true if name is one of the SVG conditional-processing attributes.

Parameters
nameAttribute name to inspect.
Returns
true if name is requiredFeatures, requiredExtensions, or systemLanguage.

◆ IsContextualPaintAttribute()

bool donner::svg::components::IsContextualPaintAttribute ( std::string_view attribute)

Whether a paint/color stack needs the final instance's cascade.

Parameters
attributePresentation property name.

◆ IsContextualScalarAttribute()

bool donner::svg::components::IsContextualScalarAttribute ( std::string_view attribute)

Whether a CSS scalar stack needs the final instance's parent cascade.

Parameters
attributePresentation property name.
Returns
True for the supported opacity and miter-limit scalar properties.

◆ IsDormantDefinitionUse()

bool donner::svg::components::IsDormantDefinitionUse ( Registry & registry,
Entity entity,
const ShadowTreeComponent & shadowTree )

Whether entity is a same-document <use> left unexpanded because it sits in a <defs> reached only through <g> ancestors.

Inside an external use's instance, the walk stops at the installed instance root, so a definition use is expanded while that instance presents it.

Parameters
registryDocument registry.
entityElement to test.
shadowTreeThe element's shadow tree component.

◆ IsEntityAttachedToDocument()

bool donner::svg::components::IsEntityAttachedToDocument ( const Registry & registry,
Entity entity )
inline

Returns true when an entity is currently part of the live document tree.

Entities without a NodeLifetimeComponent are treated as attached so legacy raw-ECS tests and transitional call sites keep their previous behavior until every SVG entity is lifetime annotated.

Parameters
registryRegistry that owns entity.
entityEntity to inspect.

◆ IsProvablySamePaint()

bool donner::svg::components::IsProvablySamePaint ( const ResolvedPaintServer & lhs,
const ResolvedPaintServer & rhs )
inline

Returns true only when both paints are provably identical: both none, or the same solid color.

A resolved reference is never reported equal, because it carries per-resolution state such as its paint subtree and context remapping.

Parameters
lhsFirst paint.
rhsSecond paint.

◆ IsSelectorEmpty()

bool donner::svg::components::IsSelectorEmpty ( const Registry & registry,
Entity dataEntity,
css::SelectorTraversalBudget * budget )

Inspect CSS emptiness using authored children and text on the authoritative data entity.

Parameters
registryRegistry shared by the tree and data entities.
dataEntityElement containing authoritative text and projection metadata.
budgetShared selector-work budget, or nullptr for an unbudgeted DOM inspection.
Returns
True if no element or non-whitespace text children exist; false on budget exhaustion.

◆ IsTextHidden()

bool donner::svg::components::IsTextHidden ( EntityHandle handle,
bool parentHidden,
const std::vector< RcString > & userLanguages )

Whether the text content of handle paints no glyphs.

It is hidden when its parent's content is hidden, when its display is none, when its conditional processing attributes fail for userLanguages, or when it is a <textPath> without a usable path or outside a text root.

Parameters
handleText content element.
parentHiddenWhether the content of handle's parent is hidden.
userLanguagesUser's preferred languages, in priority order.

◆ LoadStylesheetImports()

std::vector< css::Stylesheet > donner::svg::components::LoadStylesheetImports ( const css::Stylesheet & stylesheet,
const StylesheetImportFetch & fetch,
StylesheetImportBudget & budget,
ParseWarningSink & warnings,
std::vector< StylesheetImportOrigin > * origins = nullptr )

Load the @import rules of stylesheet and, recursively, of the stylesheets they import.

Top-level import URLs are document-relative and passed to fetch after dot-segment normalization; nested imports resolve against the URL of the stylesheet that contains them, as CSS specifies. Imports that would recurse into a stylesheet already being loaded on the current path (a cycle), exceed StylesheetImportBudget, cannot be resolved, fail to load, are not UTF-8, or have a non-CSS data URL type are skipped with a warning. Relative @font-face source URLs in an imported sheet are resolved against that sheet's URL. Warnings are reported at the offset of the top-level import that led to them, in stylesheet's local CSS coordinates, and never include URLs. Diagnostics from parsing imported text are not reported, since their offsets refer to another resource.

Parameters
stylesheetStylesheet whose imports should be loaded.
fetchCallback that loads one resolved URL.
budgetDocument-wide budget, decremented by this call.
warningsSink receiving load diagnostics.
originsOptional destination for source positions of successful import occurrences.
Returns
Imported stylesheets in cascade order: each sheet follows the sheets it imports, in import order, and all precede stylesheet.

◆ NonLanguageConditionalProcessingPasses()

bool donner::svg::components::NonLanguageConditionalProcessingPasses ( const ConditionalProcessingComponent & conditional)

Evaluates an element's conditional-processing attributes other than systemLanguage.

Matches resvg's evaluation rules so rendering agrees with the resvg-test-suite goldens:

  • requiredFeatures always evaluates to true (deprecated in SVG2, ignored).
  • requiredExtensions evaluates to true only when empty (no extensions are supported).
Parameters
conditionalConditional-processing attribute values to evaluate.
Returns
true if the non-language attributes evaluate to true.

◆ ParseAnimationLength()

std::optional< Lengthd > donner::svg::components::ParseAnimationLength ( std::string_view attribute,
std::string_view value )

Parse one animated length, including axis-appropriate refX/refY reference keywords.

Parameters
attributeAnimated field name.
valueSampled value.
Returns
One finite length, or nullopt for an invalid field value.

◆ ParseAnimationLengths()

std::optional< std::vector< Lengthd > > donner::svg::components::ParseAnimationLengths ( std::string_view input)

Parse a finite length list within the animation numeric-value limit.

Parameters
inputSVG comma/space-separated lengths, with optional units.
Returns
Parsed values, or nullopt for an empty, malformed, or excessive list.

◆ ParseAnimationOperandLengths()

std::optional< std::vector< Lengthd > > donner::svg::components::ParseAnimationOperandLengths ( std::string_view input,
const AnimationValueContext & context )

Parse an operand's length list within context's numeric limit.

Parameters
inputSVG comma/space-separated lengths, with optional units.
contextWhen it keeps leading numbers, at most its maximum count of a longer list is read and returned; otherwise this is ParseAnimationLengths.
Returns
Parsed values, or nullopt for an empty, malformed, or rejected list.

◆ ParseAnimationTimeList()

std::optional< std::vector< AnimationTimeSpecifier > > donner::svg::components::ParseAnimationTimeList ( std::string_view value)

Parse a bounded timing list.

Unsupported entries remain unresolved.

Parameters
valueAuthored timing list.
Returns
Parsed sources, or nullopt when a list exceeds its resource budget.

◆ ParseTextPositioningPresentationAttribute()

ParseResult< bool > donner::svg::components::ParseTextPositioningPresentationAttribute ( EntityHandle handle,
std::string_view name,
const parser::PropertyParseFnParams & params )

Parse the text positioning presentation attributes (x, y, dx, dy, rotate) on <text> / <tspan> / <textPath> elements into TextPositioningComponent, and invalidate the text root's cached layout so the next render picks the new positions up.

This is the programmatic-mutation counterpart of the XML parse path (ParseAttribute<SVGTextElement> in AttributeParser.cc): without it, a setAttribute("x", ...) on a text element stores the raw attribute but never updates the layout input, so programmatically positioned text renders at the origin.

Parameters
handleEntity handle of the text content element.
nameAttribute name.
paramsParse parameters containing the attribute value.
Returns
true if the attribute was handled, false for unrelated attributes.

◆ PlanRetainedUpdate()

std::optional< RetainedUpdatePlan > donner::svg::components::PlanRetainedUpdate ( Registry & registry)

Check whether the current dirty set of registry qualifies for a retained update, and plan it.

The caller must already know the render tree was built and that no full rebuild or whole-tree restyle was requested.

Parameters
registryDocument registry.
Returns
The plan, or std::nullopt when the frame needs the full rebuild.

◆ RecordAppendedSelectorText()

void donner::svg::components::RecordAppendedSelectorText ( EntityHandle parent,
std::string_view text )

Preserve a typed append when raw children are the active selector text representation.

Parameters
parentElement receiving appended text.
textAppended text.

◆ RecordDiscardedSelectorText()

void donner::svg::components::RecordDiscardedSelectorText ( EntityHandle parent,
const xml::XMLNode & node )

Preserve direct text that is about to be consumed by SVG conversion.

Existing projected content remains when no raw chunks are available during reprojection.

Parameters
parentProjected parent in the XML node's registry.
nodeXML parent before non-element children are pruned.

◆ RejectSelectorContentProjection()

void donner::svg::components::RejectSelectorContentProjection ( EntityHandle parent)

Preserve the last accepted typed text when source projection rejects its replacement.

Parameters
parentElement whose source content projection failed.

◆ RemoveConditionalProcessingAttribute()

bool donner::svg::components::RemoveConditionalProcessingAttribute ( ConditionalProcessingComponent & conditional,
const xml::XMLQualifiedNameRef & name )

Clear a conditional-processing attribute value.

Parameters
conditionalComponent to update.
nameConditional-processing attribute name.
Returns
true if name was a conditional-processing attribute and conditional was updated.

◆ ReserveAnimationGeometryBackups()

bool donner::svg::components::ReserveAnimationGeometryBackups ( Registry & registry,
AnimationResourceBudget & budget )

Admit geometry restoration storage before applying any presentation mutation.

Parameters
registryDocument storage with sampled animation values.
budgetShared output and restoration allocation envelope.
Returns
False if any geometry backup would exceed the envelope.

◆ ResetSelectorTextContent()

void donner::svg::components::ResetSelectorTextContent ( EntityHandle parent)

Replace typed text, discarding direct raw text left by incremental source projection.

Call under document write access, before assigning the replacement retained string.

Parameters
parentElement whose typed text is being replaced.

◆ ResolveAnimationTimeline() [1/2]

bool donner::svg::components::ResolveAnimationTimeline ( Registry & registry,
std::span< const Entity > animations,
double time )

Resolve animation intervals and select their state at an arbitrary document time.

Parameters
registryDocument storage.
animationsAdmitted animation declarations, in document order.
timeDocument time in seconds.
Returns
False if dependency expansion exceeds the bounded timing budget.

◆ ResolveAnimationTimeline() [2/2]

bool donner::svg::components::ResolveAnimationTimeline ( Registry & registry,
std::span< const Entity > animations,
double time,
AnimationResourceBudget & budget )

Resolve intervals using the caller's shared reference allowance.

Parameters
registryDocument storage.
animationsAdmitted declarations in document order.
timeDocument time in seconds.
budgetShared sample or event allowance.
Returns
False on timing or reference-work exhaustion.

◆ ResolveContextualLength()

std::optional< Lengthd > donner::svg::components::ResolveContextualLength ( Registry & registry,
Entity target,
std::string_view attribute,
Lengthd underlying,
const AnimationValueContext & context )

Admit and evaluate one contextual field using the shared frame preparation budget.

Parameters
registryDocument storage.
targetTarget instance.
attributeLength field.
underlyingAuthored or typed base.
contextReferencing instance's units.
Returns
Sampled length, or nullopt for absent, invalid or over-budget animation.

◆ RestoreAnimationAttributes()

void donner::svg::components::RestoreAnimationAttributes ( Registry & registry,
Entity target = entt::null )

Restore presentation-only paint/filter attributes before sampling the next frame.

Parameters
registryDocument storage.
targetRestore only this entity, or all entities when null.

◆ RestoreAnimationPresentation()

void donner::svg::components::RestoreAnimationPresentation ( Registry & registry)

Restore authored presentation before building reference trees and base styles.

Parameters
registryDocument storage with write access held.

◆ RestoreAnimationPresentationForMutation()

void donner::svg::components::RestoreAnimationPresentationForMutation ( Registry & registry,
Entity entity )

Restore the target's base values before a typed DOM setter modifies them.

Parameters
registryDocument storage with write access held.
entityTarget of the impending authored mutation.

◆ RestoreAnimationReferences()

void donner::svg::components::RestoreAnimationReferences ( Registry & registry,
Entity target = entt::null )

Restore authored resource references before rebuilding their presentation trees.

Parameters
registryDocument storage with write access held.
targetOne target, or null to restore the whole document.

◆ SampleAnimationMotion()

SampledAnimationMotion donner::svg::components::SampleAnimationMotion ( Registry & registry,
Entity entity,
const AnimateMotionComponent & motion,
double progress,
double iteration,
AnimationResourceBudget & budget )

Sample the supplemental transform for a motion animation.

Parameters
registryDocument storage.
entityMotion animation element.
motionAuthored motion attributes.
progressNormalized simple time.
iterationCompleted repeat count.
budgetShared per-frame geometry budget.
Returns
Sampled transform and composition mode; an empty transform denotes invalid motion.

◆ SampleAnimationPath()

std::optional< std::string > donner::svg::components::SampleAnimationPath ( double progress,
double iteration,
const SetAnimationComponent * set,
const AnimateValueComponent * value,
std::string_view underlying,
AnimationResourceBudget & budget )

Sample authored path parameters without geometry normalization.

Exactly one of set and value must be non-null.

Parameters
progressCurrent simple progress.
iterationCompleted iterations.
setSet declaration, or null.
valueAnimate declaration, or null.
underlyingLower-layer path value.
budgetShared preparation admission.
Returns
Sampled path (possibly empty), or no contribution on incompatible/refused composition.

◆ SampleAnimationValue()

std::optional< std::pair< std::string, std::string > > donner::svg::components::SampleAnimationValue ( double progress,
double iteration,
const SetAnimationComponent * setComp,
const AnimateValueComponent * valueComp,
const AnimateTransformComponent * transformComp,
const std::string & underlying,
const AnimationValueContext & context,
AnimationResourceBudget * budget = nullptr )

Sample one animation without document or timing side effects.

Parameters
progressProgress within the current iteration.
iterationNumber of completed iterations.
setCompSet declaration, or null.
valueCompValue declaration, or null.
transformCompTransform declaration, or null. Exactly one declaration must be supplied.
underlyingCurrent lower-layer value.
contextCoordinate and color context.
budgetOptional shared path admission; borrowed only during this call.
Returns
Owning attribute/value pair, or nullopt when the declaration cannot be sampled.

◆ SampleContextualAnimationRecipe()

template<typename Value, typename Sampler>
std::optional< Value > donner::svg::components::SampleContextualAnimationRecipe ( const ContextualLengthRecipe & recipe,
Value underlying,
Sampler && sampler )

Fold an admitted contextual animation stack, rebuilding frozen to-only underliers as needed.

Template Parameters
ValueOwning consumer value copied at frozen sandwich boundaries.
Parameters
recipeImmutable admitted stack.
underlyingAuthored, styled, or typed base for the referencing instance.
samplerCallable(sample, lowerValue) returning a valid contributed value or nullopt.
Returns
Last valid contribution, or nullopt when no layer contributes.

◆ SampleContextualLengthRecipe()

std::optional< Lengthd > donner::svg::components::SampleContextualLengthRecipe ( const ContextualLengthRecipe & recipe,
Lengthd underlying,
const AnimationValueContext & context )

Evaluate an admitted contextual length stack with the shared interpolation rules.

Parameters
recipeImmutable, previously admitted samples in sandwich order.
underlyingAuthored or typed base value in this instance.
contextActual percentage and font context.
Returns
Final finite single length, or nullopt when no layer contributes. The caller must admit recipe.evaluationWork before invoking this operation.

◆ SelectAnimationSegment()

std::optional< AnimationSegment > donner::svg::components::SelectAnimationSegment ( double progress,
std::size_t count,
const AnimationInterpolation & options,
std::span< const double > distances = {} )

Validate keyframe timing and select the interval for a normalized time.

Parameters
progressNormalized simple time.
countNumber of effective values.
optionsTiming and validation state.
distancesDistance for each consecutive pair, required for paced mode.
Returns
Selected interval, or nullopt for invalid timing.

◆ SerializeAnimationPathGeometry()

std::optional< std::string > donner::svg::components::SerializeAnimationPathGeometry ( const Path & path,
AnimationResourceBudget & budget )

Serialize typed geometry with bounded allocation and round-trip coordinate precision.

Parameters
pathTyped underlying geometry.
budgetShared preparation admission.
Returns
SVG data (possibly empty), or nullopt for invalid/refused geometry.

◆ SerializeAnimationUrl()

std::optional< std::string > donner::svg::components::SerializeAnimationUrl ( std::string_view href)

Serialize an escaped, quoted CSS URL within the animation output envelope.

Parameters
hrefRaw URL. The caller admits copying/escaping work before calling.
Returns
Owned CSS representation, or nullopt when it exceeds the output envelope.

◆ SetConditionalProcessingAttribute()

bool donner::svg::components::SetConditionalProcessingAttribute ( ConditionalProcessingComponent & conditional,
const xml::XMLQualifiedNameRef & name,
std::string_view value )

Store a conditional-processing attribute value.

Parameters
conditionalComponent to update.
nameConditional-processing attribute name.
valueRaw attribute value.
Returns
true if name was a conditional-processing attribute and conditional was updated.

◆ SpanPatternSlotId()

std::uint64_t donner::svg::components::SpanPatternSlotId ( std::uint32_t document,
int drawOrder,
std::size_t index )
inline

The span pattern slot of entry index of RenderingInstanceComponent::spanPatternPaints for the instance at drawOrder in the document the renderer driver numbers document.

Draw orders restart in each document's render tree, so the document number keeps slots unique to their instance among the documents one driver draws into a renderer in a frame: a tile one instance staged and never drew cannot be read by another instance's draw.

Parameters
documentThe driver's number for the instance's document; its low 16 bits are used.
drawOrderThe instance's draw order.
indexIndex below kMaxSpanPatternPaints.

◆ StyleParentElement()

Entity donner::svg::components::StyleParentElement ( const Registry & registry,
Entity treeEntity )
inline

The parent of treeEntity as selector matching walks to it, or entt::null where the walk stops: at a parent that is not an SVG element.

Shadow entities carry no ElementTypeComponent themselves, so a parent is checked through its data entity; otherwise a shadow entity whose parent is also a shadow entity would appear parentless. A <use> main shadow root is a tree child of its host, so a clone's walk continues into the host and its ancestors.

◆ SystemLanguageMatches()

bool donner::svg::components::SystemLanguageMatches ( std::string_view systemLanguage,
std::string_view userLanguage )

Evaluates a single systemLanguage attribute value against the user-preferred language.

Parameters
systemLanguageComma-separated list of BCP 47 language tags (e.g. "ru, en").
userLanguageUser-preferred language tag to match against (e.g. "en"). A document tag matches if it equals userLanguage or starts with userLanguage + "-", compared case-insensitively.
Returns
true if any tag in the list matches the user language.

◆ SystemLanguageMatchRank()

std::optional< size_t > donner::svg::components::SystemLanguageMatchRank ( std::string_view systemLanguage,
std::span< const RcString > userLanguages )

Returns the index of the highest-priority user-preferred language matched by a systemLanguage attribute value, for priority-ordered <switch> child selection.

Parameters
systemLanguageComma-separated list of BCP 47 language tags (e.g. "ru, en").
userLanguagesUser's preferred languages, in priority order (see SVGDocument::setUserLanguages). Lower indices are higher priority.
Returns
Index into userLanguages of the best match per SystemLanguageMatches, or std::nullopt when nothing matches. An empty list matches nothing.

◆ TryParallelStylePass()

bool donner::svg::components::TryParallelStylePass ( Registry & registry,
ParseWarningSink & warnings,
tasks::TaskScheduler * scheduler,
StylePassSelection selection )

Try a scheduled cascade of the missing slots in this selection under the caller's document access.

Parameters
registryDocument storage, held exclusively until this call returns.
warningsDestination for serial-order diagnostics.
schedulerOptional borrowed scheduler.
selectionOriginal full or dirty pass.
Returns
True if the pass was committed, including serial recovery after a tentative refusal.

◆ UnderlyingAnimationValue()

std::optional< std::string > donner::svg::components::UnderlyingAnimationValue ( Registry & registry,
Entity target,
std::string_view attribute,
const AnimationValueContext & context,
AnimationResourceBudget & budget )

Read the underlying presentation value, including lower animation layers.

Parameters
registryDocument storage.
targetAnimation target.
attributeAnimated attribute name.
contextResolved target context.
budgetShared source budget, charged before any potentially large copy.
Returns
An owning serialized value (possibly empty), or nullopt when unavailable/refused.

◆ ValidAnimationNumericOperand()

bool donner::svg::components::ValidAnimationNumericOperand ( std::string_view input,
const AnimationValueContext & context )

Validate a source operand against the target's numeric grammar before interpolation.

Parameters
inputAuthored or underlying operand.
contextTarget numeric restrictions.
Returns
Whether the operand is valid, or the context accepts general values.

◆ VisitAnimationNumberAttribute()

template<typename Visitor>
bool donner::svg::components::VisitAnimationNumberAttribute ( Registry & registry,
Entity target,
std::string_view name,
Visitor && visitor )

Use one field mapping for numeric animation application and underlying-value reads.

Parameters
registryDocument storage with write access held.
targetAnimation target.
nameAttribute name.
visitorCalled with the component and its numeric member pointer.
Returns
Whether this is a supported numeric attribute on the target.

◆ VisitAnimationNumberFields()

template<typename Component, typename Value, typename Visitor>
bool donner::svg::components::VisitAnimationNumberFields ( Registry & registry,
Entity target,
std::string_view name,
std::initializer_list< std::pair< std::string_view, Value Component::* > > fields,
Visitor & visitor )

Visit a matching numeric field on an existing component.

Parameters
registryDocument storage with write access held.
targetAnimation target.
nameAttribute name.
fieldsAttribute/member mappings for this component type.
visitorCalled once with the component and member pointer when found.
Returns
Whether a matching field exists on this target.

Variable Documentation

◆ kMaximumFilterFrameBytes

std::uint64_t donner::svg::components::kMaximumFilterFrameBytes = 256ULL * 1024 * 1024
inlineconstexpr

Maximum filter memory reserved across one frame, including RGBA capture surfaces.

Native builds allow one established high-zoom blur capture plus its in-place float surface. Wasm retains the lower ceiling because its fixed heap cannot safely admit that desktop-only workload. Renderer surfaces and decoded resources remain separately bounded.

◆ kMaximumFilterFrameWorkUnits

std::uint64_t donner::svg::components::kMaximumFilterFrameWorkUnits = 512ULL * 1024 * 1024
inlineconstexpr

Maximum aggregate pixel operations accepted across one rendered frame.

The established splash asset contains three independent high-zoom blur layers. This allows that bounded workload while rejecting a fourth full-envelope blur and large repeated graphs.

◆ kMaximumFilterIntermediateBytes

std::uint64_t donner::svg::components::kMaximumFilterIntermediateBytes = 256ULL * 1024 * 1024
inlineconstexpr

Maximum estimated bytes retained by filter intermediates during one execution.

This keeps ordinary production-sized filters available while preventing one graph from consuming a large fraction of the desktop or Wasm heap.

◆ kMaximumFilterKernelValues

std::size_t donner::svg::components::kMaximumFilterKernelValues
inlineconstexpr
Initial value:
=
constexpr int kMaximumFilterConvolveOrder
Maximum convolve order on either axis and aggregate kernel payload.
Definition FilterGraph.h:85

Maximum number of coefficients accepted by an feConvolveMatrix kernel.

◆ kMaximumFilterMorphologyRetainedBuffers

std::uint64_t donner::svg::components::kMaximumFilterMorphologyRetainedBuffers
inlineconstexpr
Initial value:
=
constexpr std::uint64_t kMaximumFilterMorphologyPassesPerAxis
Geode decomposes morphology into shader passes whose per-axis radius is at most 31.
Definition FilterGraph.h:55

Bound for temporary buffers retained by a multi-pass morphology execution.

◆ kMaximumFilterMorphologyWorkMultiplier

std::uint64_t donner::svg::components::kMaximumFilterMorphologyWorkMultiplier
inlineconstexpr
Initial value:
=
constexpr int kMaximumFilterPixelRadius
Maximum blur standard deviation or morphology radius after conversion to device pixels.
Definition FilterGraph.h:52

Bound for aggregate morphology work after splitting a large radius into shader passes.

◆ kMaximumFilterSurfacePixels

std::size_t donner::svg::components::kMaximumFilterSurfacePixels = 12 * 1024 * 1024
inlineconstexpr

Maximum pixel area of a filter-specific intermediate surface.

CPU filter execution expands each pixel into several float buffers. Keep the limit below a 4096-by-4096 surface while retaining the established high-zoom rendering envelope.