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 ®istry, Entity target) |
| Read the current typed resource reference, falling back to attributes for other elements. | |
| AnimationValueContext | AnimationContextFor (Registry ®istry, Entity target, std::string_view attribute, AnimationResourceBudget &budget) |
| Resolve units and colors for an animation target. | |
| std::optional< RcString > | CascadedAnimationPathData (Registry ®istry, Entity target, AnimationResourceBudget &budget) |
| Resolve typed, animated and CSS path data using the rendering cascade. | |
| std::optional< std::string > | UnderlyingAnimationValue (Registry ®istry, 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 ®istry, 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 ®istry, Entity target, std::string_view attribute) |
| Find an owning contextual recipe, following a shadow entity to its authored source. | |
| std::optional< Lengthd > | ResolveContextualLength (Registry ®istry, 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 ®istry, 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 ®istry, 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 ®istry, 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 ®istry, std::string_view id, AnimationResourceBudget &budget) |
| Resolve an attached animation reference with bounded document traversal. | |
| std::vector< Entity > | CollectAnimationEntities (Registry ®istry, AnimationCollectionMode mode=AnimationCollectionMode::ReadOnly) |
| Collect attached animation declarations in document order. | |
| bool | IsAnimationInSvgNamespace (Registry ®istry, 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 ®istry, std::span< const Entity > animations, double time) |
| Resolve animation intervals and select their state at an arbitrary document time. | |
| bool | ResolveAnimationTimeline (Registry ®istry, std::span< const Entity > animations, double time, AnimationResourceBudget &budget) |
| Resolve intervals using the caller's shared reference allowance. | |
| bool | InsertAnimationInstance (std::vector< double > ×, 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 ®istry, 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 ®istry, ParseWarningSink &warningSink, StylePassScheduler scheduler) |
| Apply the live style portion of a retained update. | |
| bool | HasSvgNamespace (const Registry ®istry, 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 ®istry) |
| Advance the document's font-preparation epoch so cached dependency evidence is rebuilt. | |
| Entity | ExternalUseInstanceRoot (const Registry ®istry) |
The root an external <use> is instantiating from registry, or entt::null. | |
| ParseResult< bool > | ParseSizedElementPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams ¶ms) |
| Parse presentation attributes for sized elements (SVG, Use, Image), such as x, y, width, height. | |
| bool | IsEntityAttachedToDocument (const Registry ®istry, 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 ¶ms) |
| Parse presentation attributes for a <stop> element, such as stop-color and stop-opacity. | |
| void | InvalidateReferenceDependents (Registry ®istry) |
| 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 ¶ms) |
| Parse presentation attributes for a <circle> element, such as cx, cy, r. | |
| ParseResult< bool > | ParseEllipsePresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams ¶ms) |
| 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 ¶ms) |
| 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 ¶ms) |
| Parse presentation attributes for a <path> element (the "d" attribute). | |
| void | ApplyPaintAnimationStyles (const Registry ®istry, 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 ®istry, 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 ®istry, 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 ®istry, 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 ®istry, 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 ®istry, 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 ®istry, 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 ¶ms) |
| 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 ®istry, Entity target=entt::null) |
| Restore presentation-only paint/filter attributes before sampling the next frame. | |
| bool | ApplyAnimationAttributes (Registry ®istry) |
| Apply sampled paint/filter attributes with bounded restoration storage. | |
| bool | ReserveAnimationGeometryBackups (Registry ®istry, AnimationResourceBudget &budget) |
| Admit geometry restoration storage before applying any presentation mutation. | |
| void | RestoreAnimationPresentationForMutation (Registry ®istry, Entity entity) |
| Restore the target's base values before a typed DOM setter modifies them. | |
| void | RestoreAnimationPresentation (Registry ®istry) |
| Restore authored presentation before building reference trees and base styles. | |
| void | ApplyAnimationPresentation (Registry ®istry) |
| Sample animation and apply reversible style, geometry, and transform presentation values. | |
| void | RestoreAnimationReferences (Registry ®istry, Entity target=entt::null) |
| Restore authored resource references before rebuilding their presentation trees. | |
| void | FinalizeAnimationReferences (Registry ®istry) |
| 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 ®istry) |
| Apply sampled resource references before shadow-tree expansion and resource loading. | |
| void | ForgetMissingFallbackFontReport (Registry ®istry) |
| 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 ®istry, 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 ®istry) |
Check whether the current dirty set of registry qualifies for a retained update, and plan it. | |
| void | ApplyRetainedUpdate (Registry ®istry, 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 ®istry, 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. | |
Contains the implementation of the Donner ECS,.
Classes are named as follows:
Registry::ctx().| struct donner::svg::components::AnimationStyleContext |
| 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). |
| struct donner::svg::components::MPathComponent |
Reference from an mpath child to a local path element.
| Class Members | ||
|---|---|---|
| string | href | Local fragment reference. |
| struct donner::svg::components::AnimationSegment |
| struct donner::svg::components::SampledAnimationMotion |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| struct donner::svg::components::EvaluatedReferenceComponent |
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.
| ReferenceType | tag 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. |
| 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). |
| 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. |
| struct donner::svg::components::GpuFilterWorkingSet |
| struct donner::svg::components::FilterPrimitiveComponent |
Parameters for SVGFilterPrimitiveStandardAttributes.
| 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. |
| 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]. |
| struct donner::svg::components::FEOffsetComponent |
Parameters for SVGFEOffsetElement.
| Class Members | ||
|---|---|---|
| double | dx = 0.0 | The horizontal offset. |
| double | dy = 0.0 | The vertical offset. |
| 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. |
| 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. |
| 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. |
| struct donner::svg::components::FEImageComponent |
Parameters for SVGFEImageElement.
| Class Members | ||
|---|---|---|
| RcString | href | Image URL or fragment reference. |
| PreserveAspectRatio | preserveAspectRatio | How to fit the image. |
| 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. |
| 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. |
| struct donner::svg::components::FEDiffuseLightingComponent |
Parameters for SVGFEDiffuseLightingElement.
| 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. |
| struct donner::svg::components::FESpecularLightingComponent |
Parameters for SVGFESpecularLightingElement.
| 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. |
| 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. |
| 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 | |
| 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 | |
| struct donner::svg::components::FontResourcePreparationState |
| 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 | |
| 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"). |
| 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. |
| 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. |
| 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. |
| 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. |
| 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). |
| 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). |
| 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. |
| 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). |
| struct donner::svg::components::ViewBoxComponent |
| 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. |
| struct donner::svg::components::NodeExternalRefState |
| 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. |
| 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. |
| 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. |
| 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. |
| struct donner::svg::components::StopComponent |
Stores the properties of a <stop> element.
| Class Members | ||
|---|---|---|
| StopProperties | properties | The properties of the <stop> element. |
| struct donner::svg::components::PathLengthComponent |
| 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(). |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| struct donner::svg::components::ImageComponent |
| 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. |
| 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. |
| 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. |
| struct donner::svg::components::ShadowTreeRootComponent |
| 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. |
| 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. |
| struct donner::svg::components::CircleComponent |
Parameters for a <circle> element.
| Class Members | ||
|---|---|---|
| CircleProperties | properties | The properties for the circle. |
| struct donner::svg::components::ComputedInstanceGeometryComponent |
| struct donner::svg::components::EllipseComponent |
Parameters for a <ellipse> element.
| Class Members | ||
|---|---|---|
| EllipseProperties | properties | The properties of the ellipse. |
| 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. |
| struct donner::svg::components::RectComponent |
Parameters for a <rect> element.
| Class Members | ||
|---|---|---|
| RectProperties | properties | The properties of the rectangle. |
| 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.
| struct donner::svg::components::DisableMatchedPropertiesCacheForTesting |
Context switch for comparing the cached and uncached paths on the same document.
| 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 | |
| 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. |
| 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.
| struct donner::svg::components::SelectorRawTextAuthorityTag |
Incremental content projection retained a complete raw-text child view for selectors.
| struct donner::svg::components::SelectorRejectedTextTag |
A rejected source projection leaves retained typed text authoritative.
| 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. |
| 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. |
| 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.
| struct donner::svg::components::UnfilteredCascadeForTesting |
Runs the ordinary cascade without its ancestor filter for differential comparisons.
| struct donner::svg::components::StylesheetEditScanLimitsForTesting |
| 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 | |
| struct donner::svg::components::StylesheetImportOrigin |
| 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. |
| 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.
| 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. |
| 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. |
| 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. |
| 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. |
| struct donner::svg::components::TextPositioningComponent |
Defines the positioning of a text element, which may have other text elements as children.
| 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. |
| 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.
| 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. |
| 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.
| struct donner::svg::components::MissingFallbackFontReported |
Registry context marker: the document's missing packaged fallback font was already reported.
| 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. |
Variant holding any filter primitive type.
The resolved paint server for a fill or stroke.
Type definition for a callback to process sized elements.
This allows systems that can't directly depend on LayoutSystem to request sized element processing.
| registry | ECS registry. |
| shadowEntity | The shadow entity to create a computed component for. |
| useEntity | The source <use> that may provide size override. |
| symbolEntity | The target <symbol> entity whose properties might be overridden. |
| branchType | The type of branch being created. |
| warningSink | Output vector of parse errors, if any. |
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.
|
strong |
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:
| Enumerator | |
|---|---|
| ReadOnly | Preserve runtime state for read-side queries. |
| DiscardExcludedState | Requires write access; discard sessions outside the SVG namespace. |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Standard named inputs available to filter primitives.
|
strong |
Controls how the attached element is rendered, determines how different element types are rendered.
|
strong |
There are two types of shadow trees:
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.
|
strong |
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. |
|
strong |
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. |
|
strong |
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. |
|
strong |
| void donner::svg::components::AcceptSelectorTextValueProjection | ( | EntityHandle | parent | ) |
Accept a value-only edit without inferring a complete raw view from attached text deltas.
| parent | Element whose typed value projection succeeded. |
|
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.
| name | Animated attribute name. |
| AnimationValueContext donner::svg::components::AnimationContextFor | ( | Registry & | registry, |
| Entity | target, | ||
| std::string_view | attribute, | ||
| AnimationResourceBudget & | budget ) |
Resolve units and colors for an animation target.
| registry | Document storage. |
| target | Animation target. |
| attribute | Animated attribute name. |
| budget | Shared budget for resolving inherited coordinate units. |
| std::optional< RcString > donner::svg::components::AnimationReferenceValue | ( | Registry & | registry, |
| Entity | target ) |
Read the current typed resource reference, falling back to attributes for other elements.
| registry | Document storage. |
| target | Reference-bearing element. |
| 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.
| first | First value. |
| second | Second value. |
| context | Relative unit and color context. |
| bool donner::svg::components::ApplyAnimationAttributes | ( | Registry & | registry | ) |
Apply sampled paint/filter attributes with bounded restoration storage.
| registry | Document storage. |
| void donner::svg::components::ApplyAnimationPresentation | ( | Registry & | registry | ) |
Sample animation and apply reversible style, geometry, and transform presentation values.
| registry | Document storage, held with write access by render preparation. |
| bool donner::svg::components::ApplyAnimationReferences | ( | Registry & | registry | ) |
Apply sampled resource references before shadow-tree expansion and resource loading.
| registry | Document storage with sampled animation values. |
|
nodiscard |
Apply the live style portion of a retained update.
Live DOM edits install this callback.
| registry | Document registry. |
| warningSink | Destination for accepted diagnostics. |
| scheduler | Scheduler available to the style pass. |
| 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.
| animationBudget | Contextual animation allowance for a serial cascade, or null for static content. |
| registry | Target document. |
| source | Source element holding animation recipes. |
| parent | Final computed parent, or null for the root. |
| inheritPaint | Whether the parent permits fill/stroke inheritance. |
| properties | Local cascade, updated only by admitted, valid animation values. |
| 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.
| registry | Document registry. |
| plan | The plan returned by PlanRetainedUpdate for the current dirty set. |
| warningSink | Sink to collect warnings. |
| scheduler | Scheduler available for the style pass. |
| 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.
| animationBudget | Contextual animation allowance for a serial cascade, or null for static content. |
| registry | Document storage with write access held. |
| dataEntity | Authored data source, including for shadow instances. |
| parent | Completed parent style, or null for the root. |
| properties | Locally cascaded properties, updated at animation priority. |
| budget | Shared style work budget. |
| warnings | Receives invalid resource-style diagnostics. |
| 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.
| registry | Document registry. |
| entity | The <use> element. |
| href | The use's external reference. |
| warningSink | Sink to collect warnings. |
| 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.
| registry | Document storage. |
| target | Animation target. |
| attribute | Animated attribute name. |
| context | Resolved target context. |
| budget | Shared source budget. |
| 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.
| pieces | Geometry collected in one measurement space. |
| targetFromSpace | Transform from the measurement space to the target space. |
| std::optional< RcString > donner::svg::components::CascadedAnimationPathData | ( | Registry & | registry, |
| Entity | target, | ||
| AnimationResourceBudget & | budget ) |
Resolve typed, animated and CSS path data using the rendering cascade.
| registry | Document storage. |
| target | Path element. |
| budget | Shared admission. |
| std::vector< Entity > donner::svg::components::CollectAnimationEntities | ( | Registry & | registry, |
| AnimationCollectionMode | mode = AnimationCollectionMode::ReadOnly ) |
Collect attached animation declarations in document order.
| registry | Document storage. |
| mode | Read-only query or write-side session cleanup. |
| 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.
| first | First value. |
| second | Second value. |
| firstWeight | Multiplier of the first value. |
| secondWeight | Multiplier of the second value. |
| context | Relative unit and color context. |
| secondIsOffset | Treat the second length operand as an additive displacement. |
| void donner::svg::components::CompleteSelectorContentProjection | ( | EntityHandle | parent, |
| bool | contentsReparsed ) |
Complete a successful content-projection pass, preserving attribute-only summaries.
| parent | Element whose content is being projected. |
| contentsReparsed | True only when authored content was replaced from a new XML parse. |
|
inline |
Derives a byte-format-aware bound without allocating or changing the CPU filter model.
| graph | Ordered filter graph. |
| result | Receives the resource layout on success. |
| 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.
| registry | Document storage. |
| target | Target instance. |
| attribute | Length field. |
| 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).
| conditional | Conditional-processing attribute values to evaluate. |
| 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:
| conditional | Conditional-processing attribute values to evaluate. |
| userLanguages | User'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. |
|
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.
| graph | Ordered graph. |
| pixelCount | Total pixels visited, including repeated halos. |
| memoryModel | Backend retention model. |
| workUnitsOut | Receives bounded work. |
| intermediateBytesOut | Receives allocation-byte bound, excluding caller-owned captures. |
| memoryPixels | Working surface pixels; defaults to pixelCount for untiled execution. |
| executions | Repetitions sharing working textures but consuming distinct parameter slots. |
| 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.
| registry | Document storage with write access held. |
| Entity donner::svg::components::FindAnimationReference | ( | Registry & | registry, |
| std::string_view | id, | ||
| AnimationResourceBudget & | budget ) |
Resolve an attached animation reference with bounded document traversal.
| registry | Document storage. |
| id | Referenced ID, without a fragment prefix. |
| budget | Shared sample or event allowance. Rejection is sticky. |
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.
| registry | Document registry. |
| id | ID to resolve. |
id, or entt::null when none exists. | 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.
| registry | Document registry. |
|
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.
| primitive | Primitive whose upload is measured. |
|
inline |
Bounds new fixed-block allocations, including a partially filled starting block.
| requested | Conservative byte demand including aligned-slot padding. |
| bool donner::svg::components::HasConditionalProcessingAttributes | ( | const ConditionalProcessingComponent & | conditional | ) |
Return true if any conditional-processing attribute is still present on conditional.
| conditional | Component to inspect. |
|
inline |
Returns true if the paint server is not a PaintServer::None.
| paint | The paint server to check. |
| bool donner::svg::components::InsertAnimationInstance | ( | std::vector< double > & | times, |
| double | time ) |
Retain a finite event instance time, without discarding earlier intervals.
| times | Sorted runtime instance times. |
| time | New instance time. |
Invalidate animation-derived text caches when an animated text field changes.
| registry | Document storage. |
| entity | Entity whose text-related animation inputs changed. |
| void donner::svg::components::InvalidateFontResourcePreparation | ( | Registry & | registry | ) |
Advance the document's font-preparation epoch so cached dependency evidence is rebuilt.
| registry | Document registry whose preparation state changed. |
| 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:
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.
| registry | Document registry. |
| 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.
| handle | Element whose enclosing text root should be invalidated. |
handle is not inside a text subtree. Check that an element and its ancestors resolve to the SVG namespace.
| registry | Document storage. |
| entity | Element to validate. |
| bool donner::svg::components::IsConditionalProcessingAttribute | ( | const xml::XMLQualifiedNameRef & | name | ) |
Return true if name is one of the SVG conditional-processing attributes.
| name | Attribute name to inspect. |
name is requiredFeatures, requiredExtensions, or systemLanguage. | bool donner::svg::components::IsContextualPaintAttribute | ( | std::string_view | attribute | ) |
Whether a paint/color stack needs the final instance's cascade.
| attribute | Presentation property name. |
| bool donner::svg::components::IsContextualScalarAttribute | ( | std::string_view | attribute | ) |
Whether a CSS scalar stack needs the final instance's parent cascade.
| attribute | Presentation property name. |
| 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.
| registry | Document registry. |
| entity | Element to test. |
| shadowTree | The element's shadow tree component. |
|
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.
|
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.
| lhs | First paint. |
| rhs | Second paint. |
| 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.
| registry | Registry shared by the tree and data entities. |
| dataEntity | Element containing authoritative text and projection metadata. |
| budget | Shared selector-work budget, or nullptr for an unbudgeted DOM inspection. |
| 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.
| handle | Text content element. |
| parentHidden | Whether the content of handle's parent is hidden. |
| userLanguages | User's preferred languages, in priority order. |
| 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.
| stylesheet | Stylesheet whose imports should be loaded. |
| fetch | Callback that loads one resolved URL. |
| budget | Document-wide budget, decremented by this call. |
| warnings | Sink receiving load diagnostics. |
| origins | Optional destination for source positions of successful import occurrences. |
stylesheet. | 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:
| conditional | Conditional-processing attribute values to evaluate. |
| 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.
| attribute | Animated field name. |
| value | Sampled value. |
| std::optional< std::vector< Lengthd > > donner::svg::components::ParseAnimationLengths | ( | std::string_view | input | ) |
Parse a finite length list within the animation numeric-value limit.
| input | SVG comma/space-separated lengths, with optional units. |
| 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.
| input | SVG comma/space-separated lengths, with optional units. |
| context | When it keeps leading numbers, at most its maximum count of a longer list is read and returned; otherwise this is ParseAnimationLengths. |
| std::optional< std::vector< AnimationTimeSpecifier > > donner::svg::components::ParseAnimationTimeList | ( | std::string_view | value | ) |
Parse a bounded timing list.
Unsupported entries remain unresolved.
| value | Authored timing list. |
| 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.
| handle | Entity handle of the text content element. |
| name | Attribute name. |
| params | Parse parameters containing the attribute value. |
| 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.
| registry | Document registry. |
| void donner::svg::components::RecordAppendedSelectorText | ( | EntityHandle | parent, |
| std::string_view | text ) |
Preserve a typed append when raw children are the active selector text representation.
| parent | Element receiving appended text. |
| text | Appended text. |
| 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.
| parent | Projected parent in the XML node's registry. |
| node | XML parent before non-element children are pruned. |
| void donner::svg::components::RejectSelectorContentProjection | ( | EntityHandle | parent | ) |
Preserve the last accepted typed text when source projection rejects its replacement.
| parent | Element whose source content projection failed. |
| bool donner::svg::components::RemoveConditionalProcessingAttribute | ( | ConditionalProcessingComponent & | conditional, |
| const xml::XMLQualifiedNameRef & | name ) |
Clear a conditional-processing attribute value.
| conditional | Component to update. |
| name | Conditional-processing attribute name. |
name was a conditional-processing attribute and conditional was updated. | bool donner::svg::components::ReserveAnimationGeometryBackups | ( | Registry & | registry, |
| AnimationResourceBudget & | budget ) |
Admit geometry restoration storage before applying any presentation mutation.
| registry | Document storage with sampled animation values. |
| budget | Shared output and restoration allocation envelope. |
| 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.
| parent | Element whose typed text is being replaced. |
| 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.
| registry | Document storage. |
| animations | Admitted animation declarations, in document order. |
| time | Document time in seconds. |
| 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.
| registry | Document storage. |
| animations | Admitted declarations in document order. |
| time | Document time in seconds. |
| budget | Shared sample or event allowance. |
| 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.
| registry | Document storage. |
| target | Target instance. |
| attribute | Length field. |
| underlying | Authored or typed base. |
| context | Referencing instance's units. |
| void donner::svg::components::RestoreAnimationAttributes | ( | Registry & | registry, |
| Entity | target = entt::null ) |
Restore presentation-only paint/filter attributes before sampling the next frame.
| registry | Document storage. |
| target | Restore only this entity, or all entities when null. |
| void donner::svg::components::RestoreAnimationPresentation | ( | Registry & | registry | ) |
Restore authored presentation before building reference trees and base styles.
| registry | Document storage with write access held. |
| void donner::svg::components::RestoreAnimationPresentationForMutation | ( | Registry & | registry, |
| Entity | entity ) |
Restore the target's base values before a typed DOM setter modifies them.
| registry | Document storage with write access held. |
| entity | Target of the impending authored mutation. |
| void donner::svg::components::RestoreAnimationReferences | ( | Registry & | registry, |
| Entity | target = entt::null ) |
Restore authored resource references before rebuilding their presentation trees.
| registry | Document storage with write access held. |
| target | One target, or null to restore the whole document. |
| 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.
| registry | Document storage. |
| entity | Motion animation element. |
| motion | Authored motion attributes. |
| progress | Normalized simple time. |
| iteration | Completed repeat count. |
| budget | Shared per-frame geometry budget. |
| 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.
| progress | Current simple progress. |
| iteration | Completed iterations. |
| set | Set declaration, or null. |
| value | Animate declaration, or null. |
| underlying | Lower-layer path value. |
| budget | Shared preparation admission. |
| 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.
| progress | Progress within the current iteration. |
| iteration | Number of completed iterations. |
| setComp | Set declaration, or null. |
| valueComp | Value declaration, or null. |
| transformComp | Transform declaration, or null. Exactly one declaration must be supplied. |
| underlying | Current lower-layer value. |
| context | Coordinate and color context. |
| budget | Optional shared path admission; borrowed only during this call. |
| 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.
| Value | Owning consumer value copied at frozen sandwich boundaries. |
| recipe | Immutable admitted stack. |
| underlying | Authored, styled, or typed base for the referencing instance. |
| sampler | Callable(sample, lowerValue) returning a valid contributed value or nullopt. |
| 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.
| recipe | Immutable, previously admitted samples in sandwich order. |
| underlying | Authored or typed base value in this instance. |
| context | Actual percentage and font context. |
| 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.
| progress | Normalized simple time. |
| count | Number of effective values. |
| options | Timing and validation state. |
| distances | Distance for each consecutive pair, required for paced mode. |
| std::optional< std::string > donner::svg::components::SerializeAnimationPathGeometry | ( | const Path & | path, |
| AnimationResourceBudget & | budget ) |
Serialize typed geometry with bounded allocation and round-trip coordinate precision.
| path | Typed underlying geometry. |
| budget | Shared preparation admission. |
| std::optional< std::string > donner::svg::components::SerializeAnimationUrl | ( | std::string_view | href | ) |
Serialize an escaped, quoted CSS URL within the animation output envelope.
| href | Raw URL. The caller admits copying/escaping work before calling. |
| bool donner::svg::components::SetConditionalProcessingAttribute | ( | ConditionalProcessingComponent & | conditional, |
| const xml::XMLQualifiedNameRef & | name, | ||
| std::string_view | value ) |
Store a conditional-processing attribute value.
| conditional | Component to update. |
| name | Conditional-processing attribute name. |
| value | Raw attribute value. |
name was a conditional-processing attribute and conditional was updated.
|
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.
| document | The driver's number for the instance's document; its low 16 bits are used. |
| drawOrder | The instance's draw order. |
| index | Index below kMaxSpanPatternPaints. |
|
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.
| bool donner::svg::components::SystemLanguageMatches | ( | std::string_view | systemLanguage, |
| std::string_view | userLanguage ) |
Evaluates a single systemLanguage attribute value against the user-preferred language.
| systemLanguage | Comma-separated list of BCP 47 language tags (e.g. "ru, en"). |
| userLanguage | User-preferred language tag to match against (e.g. "en"). A document tag matches if it equals userLanguage or starts with userLanguage + "-", compared case-insensitively. |
| 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.
| systemLanguage | Comma-separated list of BCP 47 language tags (e.g. "ru, en"). |
| userLanguages | User's preferred languages, in priority order (see SVGDocument::setUserLanguages). Lower indices are higher priority. |
userLanguages of the best match per SystemLanguageMatches, or std::nullopt when nothing matches. An empty list matches nothing. | 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.
| registry | Document storage, held exclusively until this call returns. |
| warnings | Destination for serial-order diagnostics. |
| scheduler | Optional borrowed scheduler. |
| selection | Original full or dirty pass. |
| 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.
| registry | Document storage. |
| target | Animation target. |
| attribute | Animated attribute name. |
| context | Resolved target context. |
| budget | Shared source budget, charged before any potentially large copy. |
| bool donner::svg::components::ValidAnimationNumericOperand | ( | std::string_view | input, |
| const AnimationValueContext & | context ) |
Validate a source operand against the target's numeric grammar before interpolation.
| input | Authored or underlying operand. |
| context | Target numeric restrictions. |
| 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.
| registry | Document storage with write access held. |
| target | Animation target. |
| name | Attribute name. |
| visitor | Called with the component and its numeric member pointer. |
| 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.
| registry | Document storage with write access held. |
| target | Animation target. |
| name | Attribute name. |
| fields | Attribute/member mappings for this component type. |
| visitor | Called once with the component and member pointer when found. |
|
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.
|
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.
|
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.
|
inlineconstexpr |
Maximum number of coefficients accepted by an feConvolveMatrix kernel.
|
inlineconstexpr |
Bound for temporary buffers retained by a multi-pass morphology execution.
|
inlineconstexpr |
Bound for aggregate morphology work after splitting a large radius into shader passes.
|
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.