|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
#include <array>#include <chrono>#include <cstdint>#include <limits>#include <memory>#include <optional>#include <vector>#include "donner/base/Box.h"#include "donner/base/Path.h"#include "donner/editor/AsyncRenderer.h"#include "donner/editor/AsyncSVGDocument.h"#include "donner/editor/CompositedPresentation.h"#include "donner/editor/FrameCostBreakdown.h"#include "donner/editor/GlTextureCache.h"#include "donner/editor/OverlayRenderer.h"#include "donner/editor/PresentationRenderScheduler.h"#include "donner/editor/SelectionAabb.h"#include "donner/editor/ViewportInteractionController.h"Classes | |
| class | donner::editor::RenderCoordinator |
| Owns the advanced editor's renderer-side orchestration: async rendering, overlay rasterization, composited drag presentation, and selection-bounds cache promotion. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| bool | donner::editor::ShouldPresentCompositedPreviewForViewport (const RenderResult::CompositedPreview &preview, const Vector2i &viewportDesiredCanvas) |
| Return true when a composited preview may be presented against the current viewport. | |
| std::uint64_t | donner::editor::PostReleaseSettleTargetVersion (std::uint64_t currentFrameVersion, bool hasPendingMutations) |
| Return the document version a released drag must settle against. | |
| bool | donner::editor::ShouldDeferSelectedViewportRefresh (Entity selectedEntity, bool hasActiveDrag, std::uint64_t currentVersion, std::uint64_t displayedDocVersion, bool hasCachedPresentation, bool rasterViewportSettled, bool needsOverviewInfill, bool pendingSelectedLayerRasterization) |
| Return true when selected-layer prewarm can wait for the viewport to settle. | |
| bool | donner::editor::ShouldClearPendingSelectedLayerRasterization (const std::optional< RenderRequest::DragPreview > &representedDragPreview, Entity pendingEntity, std::uint64_t resultVersion, std::uint64_t pendingVersion) |
| Return true when a render result satisfies a pending selected-layer rasterization. | |
| std::optional< SelectTool::ActiveDragPreview > | donner::editor::OverlayRepresentedDragPreviewForPresentation (const std::optional< SelectTool::ActiveDragPreview > &activeDragPreview, const std::optional< SelectTool::ActiveDragPreview > &displayedDragPreview, bool hasPresentableActiveDragTarget) |
| Return the drag transform that overlay chrome should represent in the current presentation frame. | |
| Transform2d | donner::editor::OverlayRepresentedDocumentFromLiveDocument (const std::optional< SelectTool::ActiveDragPreview > &liveDragPreview, const std::optional< SelectTool::ActiveDragPreview > &representedDragPreview) |
| Return the document transform that projects live drag chrome onto the represented presentation. | |
| std::optional< SelectTool::ActiveGesturePreview > | donner::editor::OverlayGesturePreviewForPresentation (const std::optional< SelectTool::ActiveGesturePreview > &activeGesturePreview, const std::optional< SelectTool::ActiveDragPreview > &liveDragPreview, const std::optional< SelectTool::ActiveDragPreview > &representedDragPreview) |
| Project live gesture chrome, including the selection size/angle chip, to the overlay state. | |
|
nodiscard |
Project live gesture chrome, including the selection size/angle chip, to the overlay state.
| activeGesturePreview | Live gesture preview from the select tool. |
| liveDragPreview | Live drag transform currently applied to the DOM. |
| representedDragPreview | Drag transform the overlay/content presentation represents. |
|
nodiscard |
Return the document transform that projects live drag chrome onto the represented presentation.
| liveDragPreview | Live drag transform currently applied to the DOM. |
| representedDragPreview | Drag transform the presented content represents. |
|
nodiscard |
Return the drag transform that overlay chrome should represent in the current presentation frame.
| activeDragPreview | Active drag transform used by the presenter when a drag target tile is available. |
| displayedDragPreview | Drag transform represented by the currently cached content. |
| hasPresentableActiveDragTarget | True when the presenter can draw a matching drag target tile this frame. |
|
nodiscard |
Return the document version a released drag must settle against.
| currentFrameVersion | Last flushed document frame version at mouse-up. |
| hasPendingMutations | True when the release left DOM mutations queued for the next flush. |
|
nodiscard |
Return true when a render result satisfies a pending selected-layer rasterization.
| representedDragPreview | Drag-preview metadata carried by the completed render result. |
| pendingEntity | Selected entity whose stale layer pixels must be refreshed. |
| resultVersion | Document frame version represented by the completed render result. |
| pendingVersion | Document frame version at which the pending refresh was requested. |
|
nodiscard |
Return true when selected-layer prewarm can wait for the viewport to settle.
| selectedEntity | Selected compositable entity, or entt::null. |
| hasActiveDrag | True while a drag preview is active. |
| currentVersion | Current document frame version. |
| displayedDocVersion | Document frame version currently presented. |
| hasCachedPresentation | True when any current-version presentation texture is cached. |
| rasterViewportSettled | True when the viewport has passed the commit delay. |
| needsOverviewInfill | True when a bounded viewport still needs overview coverage. |
| pendingSelectedLayerRasterization | True when selected-layer pixels are known stale. |
|
nodiscard |
Return true when a composited preview may be presented against the current viewport.
Full-canvas previews may stretch across transient canvas-size changes. Split composited previews carry per-tile raster bounds, so presenting them against a different canvas epoch can flash stale high-resolution tiles in the wrong place during zoom/drag races.
| preview | Worker-produced composited preview. |
| viewportDesiredCanvas | Canvas size implied by the current UI-frame viewport. |