Per-request handoff data captured at render-request time so the worker has everything it needs without touching live UI state.
More...
#include "donner/editor/AsyncRenderer.h"
|
|
svg::Renderer * | renderer = nullptr |
|
svg::SVGDocument * | document = nullptr |
|
std::uint64_t | version = 0 |
| | Document frame version snapshotted at request time so the UI can match the landed bitmap with other same-version assets.
|
|
std::uint64_t | documentGeneration = 0 |
| | Generation counter from AsyncSVGDocument::documentGeneration(). Only bumps when the inner document is fully replaced (source-pane reparse / load). The worker uses this to decide when to drop the compositor's activeHints_ backing the old entity space — NOT version, which bumps on every mutation and would nuke the compositor every drag frame.
|
|
std::unordered_map< Entity, Entity > | structuralRemap |
| | When non-empty, carries a remap from the previous document's entity ids to the current document's entity ids — produced by AsyncSVGDocument::setDocumentMaybeStructural when the swap was structurally equivalent (same tree shape, same ids). The worker uses the remap to call CompositorController::remapAfterStructural
Replace instead of resetAllLayers(documentReplaced=true), preserving layer bitmaps + segments across the swap. Empty map means "fall through to the `documentGeneration` mismatch path" (full reset).
|
|
std::optional< svg::SVGElement > | selection |
| | Snapshot of the selection at request time (used for overlay chrome). The worker holds this optional by value, so if the UI thread clears the selection mid-render the worker still draws the pre-render chrome.
|
|
Entity | selectedEntity = entt::null |
| | Currently-selected entity (if any) that the compositor should keep promoted across renders. The compositor demotes the previous entity and promotes this one when it changes. Allows pre-warming on selection so the subsequent drag frame has cached bg/fg/layer bitmaps ready. The compositor stays alive across drag → idle transitions for as long as this stays non-null and pointing at the same entity.
|
|
std::optional< DragPreview > | dragPreview |
| | Optional in-progress drag preview rendered through the compositor fast path.
|
Per-request handoff data captured at render-request time so the worker has everything it needs without touching live UI state.
◆ donner::editor::RenderRequest::DragPreview
| struct donner::editor::RenderRequest::DragPreview |
| Class Members |
|
Entity |
entity = entt::null |
|
|
InteractionHint |
interactionKind = svg::compositor::InteractionHint::ActiveDrag |
Which interaction phase drove this preview. Selection means the editor is pre-warming a layer for the selected entity before any drag begins. ActiveDrag means the user is actively dragging — the DOM's transform attribute already reflects the cursor delta, so no extra translation is passed here. The compositor stamps the correct InteractionHint on the entity based on this field so downstream introspection stays accurate. |
◆ document
◆ documentGeneration
| std::uint64_t donner::editor::RenderRequest::documentGeneration = 0 |
Generation counter from AsyncSVGDocument::documentGeneration(). Only bumps when the inner document is fully replaced (source-pane reparse / load). The worker uses this to decide when to drop the compositor's activeHints_ backing the old entity space — NOT version, which bumps on every mutation and would nuke the compositor every drag frame.
◆ dragPreview
| std::optional<DragPreview> donner::editor::RenderRequest::dragPreview |
Optional in-progress drag preview rendered through the compositor fast path.
◆ renderer
◆ selectedEntity
| Entity donner::editor::RenderRequest::selectedEntity = entt::null |
Currently-selected entity (if any) that the compositor should keep promoted across renders. The compositor demotes the previous entity and promotes this one when it changes. Allows pre-warming on selection so the subsequent drag frame has cached bg/fg/layer bitmaps ready. The compositor stays alive across drag → idle transitions for as long as this stays non-null and pointing at the same entity.
◆ selection
Snapshot of the selection at request time (used for overlay chrome). The worker holds this optional by value, so if the UI thread clears the selection mid-render the worker still draws the pre-render chrome.
◆ structuralRemap
| std::unordered_map<Entity, Entity> donner::editor::RenderRequest::structuralRemap |
When non-empty, carries a remap from the previous document's entity ids to the current document's entity ids — produced by AsyncSVGDocument::setDocumentMaybeStructural when the swap was structurally equivalent (same tree shape, same ids). The worker uses the remap to call CompositorController::remapAfterStructural
Replace instead of resetAllLayers(documentReplaced=true), preserving layer bitmaps + segments across the swap. Empty map means "fall through to the `documentGeneration` mismatch path" (full reset).
◆ version
| std::uint64_t donner::editor::RenderRequest::version = 0 |
Document frame version snapshotted at request time so the UI can match the landed bitmap with other same-version assets.
The documentation for this struct was generated from the following file: