AsyncSVGDocument is the editor-owned wrapper around svg::SVGDocument. It gates canvas, tool, and application mutations through the CommandQueue, applies incremental source-pane edits through a separate guarded seam, and provides the snapshot hand-off to the render thread. More...
#include <atomic>#include <cstdint>#include <memory>#include <optional>#include <string_view>#include <unordered_map>#include <utility>#include <vector>#include "donner/base/EcsRegistry.h"#include "donner/base/ParseDiagnostic.h"#include "donner/base/xml/XMLDocument.h"#include "donner/base/xml/XMLParser.h"#include "donner/base/xml/XMLSourceStore.h"#include "donner/editor/CommandQueue.h"#include "donner/svg/SVGDocument.h"Classes | |
| class | donner::editor::AsyncSVGDocument |
| Wraps an svg::SVGDocument and the editor's per-frame command queue. More... | |
| struct | donner::editor::AsyncSVGDocument::FlushResult |
| Outcome of applying queued document mutations. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
AsyncSVGDocument is the editor-owned wrapper around svg::SVGDocument. It gates canvas, tool, and application mutations through the CommandQueue, applies incremental source-pane edits through a separate guarded seam, and provides the snapshot hand-off to the render thread.
The editor now renders on a dedicated AsyncRenderer worker. The worker shares the live document registry under ConcurrentDom access guards, while frame-version and document-generation counters let the UI discard stale results and preserve valid compositor state across structural reparses.
| struct donner::editor::AsyncSVGDocument::FlushResult |
Outcome of applying queued document mutations.
| Class Members | ||
|---|---|---|
| bool | appliedCommands = false | |
| vector< Entity > | cacheInvalidatedElements | Entities whose existing rendered pixels may have changed because of an incremental command. |
| bool | hadPriorAppliedCommandsOnRollback = false | A prior command in this flush still changed source before that rollback. |
| bool | onlyTransformCommands = false | True only when every applied command changed an element transform. An overlay guide captured before a drag may be safely projected through these version advances without rereading clip resources; any other edit invalidates that immutable guide cache. |
| bool | preserveUndoOnReparse = false | |
| bool | removedElements = false | True when at least one flushed command removed an element from the live document. |
| bool | replacedDocument = false | |
| bool | rolledBackReplacementBatch = false | A failed replacement batch restored its exact pre-command source. |
| vector< XMLSourceDelta > | sourceDeltas | |