|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
Components are the data layer of the ECS architecture. More...
Classes | |
| struct | donner::svg::components::DirtyFlagsComponent |
| Tracks which computed properties are stale and need recomputation after a DOM mutation. More... | |
Components are the data layer of the ECS architecture.
Each component holds a specific piece of state and is attached to an entity. Components contain no logic — systems read and write them.
Components are typically small structs or classes that store the results of a computation stage (e.g., computed styles, resolved transforms, cached geometry). They are attached to entities via the entt registry and accessed by systems during processing.
| struct donner::svg::components::DirtyFlagsComponent |
Tracks which computed properties are stale and need recomputation after a DOM mutation.
Attached to entities that have been mutated since the last render. Systems check these flags during createComputedComponents() to skip clean entities and only recompute what changed.
Public Types | |
| enum | Flags : uint16_t { None = 0 , Style = 1 << 0 , Layout = 1 << 1 , Transform = 1 << 2 , WorldTransform = 1 << 3 , Shape = 1 << 4 , Paint = 1 << 5 , Filter = 1 << 6 , RenderInstance = 1 << 7 , ShadowTree = 1 << 8 , TextGeometry = 1 << 9 , StyleCascade = Style | Paint | Filter | RenderInstance , LayoutCascade = Layout | Transform | WorldTransform | RenderInstance , All = 0xFFFF } |
| Individual dirty flags for each computation stage. More... | |
Public Member Functions | |
| void | mark (uint16_t f) |
| Mark additional flags as dirty. | |
| bool | test (uint16_t f) const |
| Test whether any of the given flags are set. | |
| void | clear (uint16_t f) |
| Clear specific flags. | |
| void | clearAll () |
| Clear all flags. | |
Public Attributes | |
| uint16_t | flags = Flags::None |
| Bitfield of dirty flags. | |
| enum donner::svg::components::DirtyFlagsComponent::Flags : uint16_t |
Individual dirty flags for each computation stage.
| Enumerator | |
|---|---|
| Style | ComputedStyleComponent needs recomputation. |
| Layout | ComputedSizedElementComponent / viewBox needs recomputation. |
| Transform | ComputedLocalTransformComponent needs recomputation. |
| WorldTransform | ComputedAbsoluteTransformComponent needs recomputation. |
| Shape | ComputedPathComponent needs recomputation. |
| Paint | ResolvedPaintServer (fill/stroke) needs re-resolution. |
| Filter | Filter effect chain needs re-resolution. |
| RenderInstance | RenderingInstanceComponent needs update. |
| ShadowTree | Shadow tree needs re-instantiation. |
| TextGeometry | ComputedTextGeometryComponent needs recomputation. |
| StyleCascade | Compound flag: style change that may affect paint, filter, and render instance. |
| LayoutCascade | Compound flag: layout change that affects transforms and render instance. |
| All | All flags set. |