Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
AsyncSVGDocument.h File Reference

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 <optional>
#include <string_view>
#include <unordered_map>
#include <vector>
#include "donner/base/EcsRegistry.h"
#include "donner/base/ParseDiagnostic.h"
#include "donner/base/xml/XMLDocument.h"
#include "donner/editor/CommandQueue.h"
#include "donner/svg/SVGDocument.h"
Include dependency graph for AsyncSVGDocument.h:
This graph shows which files directly or indirectly include this file:

Classes

class  donner::editor::AsyncSVGDocument
 Wraps an svg::SVGDocument and the editor's per-frame command queue. More...
struct  donner::editor::AsyncSVGDocument::FlushResult

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Detailed Description

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.


Class Documentation

◆ donner::editor::AsyncSVGDocument::FlushResult

struct donner::editor::AsyncSVGDocument::FlushResult
Class Members
bool appliedCommands = false
vector< Entity > cacheInvalidatedElements Entities whose existing rendered pixels may have changed because of an incremental command.
bool preserveUndoOnReparse = false
bool removedElements = false True when at least one flushed command removed an element from the live document.
bool replacedDocument = false
vector< XMLSourceDelta > sourceDeltas