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

Global invalidation state, stored in the registry context via Registry::ctx(). More...

#include "donner/svg/components/DirtyFlagsComponent.h"

Classes

struct  Counters
 Observed render-tree preparation work, for tests and diagnostics. More...

Public Types

using StylePassRefused = bool (*)(const Registry&)
 Checks whether the most recent style pass refused its allocation or work budget.
using ComputeFrameStyles
 The two style passes and shadow preparation of a rebuilt frame.

Public Attributes

bool needsFullRebuild = true
 True if the render tree needs a full rebuild (structure changed, canvas resized, etc.).
bool needsFullStyleRecompute = true
 True if styles must be recomputed for the whole tree because selector dependencies may be non-local (for example class/id/attribute changes or tree mutations).
bool hasBeenBuilt = false
 True if the render tree has been built at least once.
bool needsInstanceRebuild = false
 True if only the rendering instances must be rebuilt from the current computed components, for example after the context paint an external <use> supplies changes.
bool retainedUpdatesEnabled = true
 When false, every dirty frame takes the full rebuild path (shadow-tree teardown and whole document recomputation) even if its dirty set qualifies for a retained update.
Counters counters
 Preparation counters for this document.
bool(* computeEditedFrameStyles )(Registry &, ParseWarningSink &, StylePassScheduler, ComputeFrameStyles) = nullptr
 An edited frame can stage its diagnostics until both selective passes finish.
bool(* applyLiveStyleUpdate )(Registry &, ParseWarningSink &, StylePassScheduler) = nullptr
 Installed by live style edits that can use the retained renderer.
void(* invalidateStyleOccurrences )(Registry &) = nullptr
 Clears the live style occurrence index on shadow publication or removal.

Detailed Description

Global invalidation state, stored in the registry context via Registry::ctx().

Tracks whether a full render tree rebuild is required (e.g., after setTime() or setCanvasSize()), separate from per-entity dirty flags.


Class Documentation

◆ donner::svg::components::RenderTreeState::Counters

struct donner::svg::components::RenderTreeState::Counters

Observed render-tree preparation work, for tests and diagnostics.

Class Members
uint64_t fullRebuilds = 0 Prepares that tore down and recomputed everything.
uint64_t retainedUpdates = 0 Prepares that kept the computed components.
uint64_t retargetedUses = 0
uint64_t shadowTreeTeardowns = 0 Shadow-tree hosts torn down by full rebuilds. External <use> instances re-attached in place, after a retarget or a geometry change.
uint64_t useCopyRelationBuilds = 0 Times reference invalidation rebuilt its map from elements to the <use> copies that a clip path or mask can draw.

Member Typedef Documentation

◆ ComputeFrameStyles

Initial value:
Collects parse warnings during parsing.
Definition ParseWarningSink.h:30
A borrowed scheduler for style preparation. An empty value keeps serial-only clients independent of t...
Definition StylePassScheduler.h:29
entt::basic_registry< Entity > Registry
Registry type for the SVG ECS, which is the entry point for storing all data.
Definition EcsRegistry.h:52
bool(*)(const Registry &) StylePassRefused
Checks whether the most recent style pass refused its allocation or work budget.
Definition DirtyFlagsComponent.h:120

The two style passes and shadow preparation of a rebuilt frame.

Member Data Documentation

◆ retainedUpdatesEnabled

bool donner::svg::components::RenderTreeState::retainedUpdatesEnabled = true

When false, every dirty frame takes the full rebuild path (shadow-tree teardown and whole document recomputation) even if its dirty set qualifies for a retained update.

Lets tests and diagnostics compare a retained update against the full rebuild of the same state.


The documentation for this struct was generated from the following file: