|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
#include <cstddef>#include <cstdint>#include <unordered_map>#include <utility>#include <vector>#include "donner/base/EcsRegistry.h"#include "donner/base/Transform.h"#include "donner/svg/SVGDocument.h"#include "donner/svg/compositor/ComplexityBucketer.h"#include "donner/svg/compositor/CompositorLayer.h"#include "donner/svg/compositor/LayerResolver.h"#include "donner/svg/compositor/MandatoryHintDetector.h"#include "donner/svg/compositor/ScopedCompositorHint.h"#include "donner/svg/renderer/RendererInterface.h"Classes | |
| struct | donner::svg::compositor::CompositorTile |
| A single bitmap cache unit the compositor exposes for GPU upload — either a static segment (non-promoted content between promoted layers) or a promoted layer's own rasterization. More... | |
| struct | donner::svg::compositor::CompositorConfig |
| Runtime feature gates for CompositorController. More... | |
| class | donner::svg::compositor::CompositorController |
| Controls compositor layer promotion/demotion and orchestrates composited rendering. More... | |
| struct | donner::svg::compositor::CompositorController::FastPathCounters |
| Diagnostic counters for the translation-only fast path. Tests read these to assert that a drag is taking the fast path every frame, not falling through to prepareDocumentForRendering. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
| namespace | donner::svg |
| Donner SVG library, which can load, manipulate and render SVG files. | |
Functions | |
| std::unordered_map< Entity, Entity > | donner::svg::compositor::BuildStructuralEntityRemap (const SVGDocument &oldDoc, const SVGDocument &newDoc) |
Walk the XML trees of oldDoc and newDoc in lockstep and build a remap from old-registry entity ids → new-registry entity ids, suitable for CompositorController::remapAfterStructuralReplace. | |
| struct donner::svg::compositor::CompositorController::FastPathCounters |
Diagnostic counters for the translation-only fast path. Tests read these to assert that a drag is taking the fast path every frame, not falling through to prepareDocumentForRendering.
|
nodiscard |
Walk the XML trees of oldDoc and newDoc in lockstep and build a remap from old-registry entity ids → new-registry entity ids, suitable for CompositorController::remapAfterStructuralReplace.
Returns an empty map if the two trees are not structurally equivalent — defined as: same preorder walk, same element tag name at every step, and same id attribute at every step (or neither has one). Attribute values other than id are allowed to differ — the drag-end writeback case changes transform values, not tree shape.
The returned map covers every element visited in the walk. The caller is responsible for handing it to remapAfterStructuralReplace on the compositor that was previously tracking oldDoc's entity space.