Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
AsyncSVGDocument.h File Reference

AsyncSVGDocument is the editor-owned wrapper around svg::SVGDocument that gates DOM mutations through the CommandQueue and provides the snapshot hand-off to the render thread described in the M1.5 design note in docs/design_docs/editor.md. More...

#include <atomic>
#include <cstdint>
#include <optional>
#include <string_view>
#include <unordered_map>
#include "donner/base/EcsRegistry.h"
#include "donner/base/ParseDiagnostic.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 that gates DOM mutations through the CommandQueue and provides the snapshot hand-off to the render thread described in the M1.5 design note in docs/design_docs/editor.md.

The current M2 implementation is single-threaded: there is no real render thread yet, so the snapshot hand-off is just a pointer to the live document. The frame version counter is in place so the render thread coordination can be wired up incrementally without changing the public surface.


Class Documentation

◆ donner::editor::AsyncSVGDocument::FlushResult

struct donner::editor::AsyncSVGDocument::FlushResult
Class Members
bool appliedCommands = false
bool preserveUndoOnReparse = false
bool replacedDocument = false