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"
Classes | |
| struct | DragPreview |
| Drag state snapshotted with one worker render request. More... | |
Public Member Functions | |
| RenderRequest (svg::Renderer &renderer, svg::SVGDocument document) | |
| Construct a render request. | |
Public Attributes | |
| RenderLease | lease |
| Non-null renderer/document lease for the worker handoff. | |
| std::function< void()> | afterDocumentCaptureForTesting |
| Test barrier after paired scene capture and DOM release, before exporting renderer pixels. | |
| std::chrono::steady_clock::time_point | queuedAt |
| Internal timestamp captured by requestRender() for queue-latency diagnostics. | |
| 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. | |
| bool | capturePointerTargets = false |
| Pair immutable mouse hit geometry with this render for Preview interaction. | |
| std::uint64_t | documentGeneration = 0 |
| Generation counter from AsyncSVGDocument::documentGeneration(). Bumps only when the inner document is fully replaced, so the worker can reset entity-keyed compositor state without treating every frame mutation as a replacement. | |
| std::uint64_t | fontResourceRevision = 0 |
| Font adoption identity captured before the worker's dirty-region snapshot. | |
| std::uint64_t | geometryRevision = 0 |
| Non-transform content and renderer settings consumed by this render. | |
| std::uint64_t | presentationEpoch = 0 |
| Presentation-refresh epoch of the renderer settings this render used. | |
| std::uint64_t | captureId = 0 |
| Immutable per-render identity assigned when the request is admitted. | |
| std::vector< svg::SVGElement > | selectedElements |
| Selection whose geometry must accompany the raster, in selection order. | |
| std::vector< Entity > | trackedPresentationObjects |
| Objects whose affine presentation has not yet been incorporated into a raster. | |
| std::vector< svg::SVGElement > | sourceHoverElements |
| Source and rejection annotations captured from the same guarded state as the pixels. | |
| std::optional< LockedRejectionFlashInput > | lockedFlash |
| Locked-element rejection flash captured with the pixels, when one is showing. | |
| std::optional< CapturedPresentation::TextEditing > | textEditing |
| Text-editing annotations captured with the pixels, when a text session is open. | |
| std::unordered_map< Entity, Entity > | structuralRemap |
| Entity remap for structurally equivalent document replacement. When present, the worker remaps compositor state instead of fully resetting layer bitmaps and static segments. | |
| 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. | |
| EditorRasterViewport | rasterViewport |
| Raster viewport for this request. The UI thread computes it from the editor camera so the worker can render a bounded high-zoom output surface without reading live UI state. | |
| ViewportState | viewport |
| Live editor viewport rasterViewport was derived from. | |
| bool | presentationCoverageRepair = false |
| Request repairs a frame rejected for incompatible raster/pose coverage. | |
| int | presentationRepairReason = 0 |
| Missing presentation proof carried by the request. | |
| bool | overviewInfillOnly = false |
| True when this request should produce only a low-resolution full-document overview infill. | |
| bool | captureCpuSnapshot = false |
| Capture a CPU-readable copy of the fully composed frame. | |
| std::uint64_t | cpuSnapshotRequestId = 0 |
| Nonzero identity for an explicit editor pixel capture; echoed in the result. | |
Per-request handoff data captured at render-request time so the worker has everything it needs without touching live UI state.
| struct donner::editor::RenderRequest::DragPreview |
Drag state snapshotted with one worker render request.
| Class Members | ||
|---|---|---|
| Transform2d | documentFromCachedDocument = Transform2d() | Active affine transform represented by this request, relative to the drag-start cached document. Selection prewarms use identity. |
| uint64_t | dragGeneration = 0 | Monotonic id for the active drag gesture. Selection prewarms use zero. |
| Entity | entity = entt::null | Primary entity whose drag this request represents. |
| vector< Entity > | extraEntities | Additional entities moving with entity under the same active drag transform. |
| bool | forceLayerRasterization = false | True when this request must re-rasterize the promoted drag layer instead of only publishing updated compose metadata. Used for scheduler-requested affine recaptures that keep scaled drag previews crisp. |
| 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. The compositor stamps the correct InteractionHint on the entity based on this field so downstream introspection stays accurate. |
| Vector2d | translation = Vector2d::Zero() | Active drag translation represented by this request. Selection prewarms use zero. |
|
inline |
Construct a render request.
| renderer | Renderer backend that remains alive until the request completes. |
| document | Document handle to render. The request keeps its registry handle alive while the worker owns the request. |
| bool donner::editor::RenderRequest::captureCpuSnapshot = false |
Capture a CPU-readable copy of the fully composed frame.
Geode normally publishes GPU texture tiles without readback. Diagnostics, replay tools, and pixel-asserting tests set this flag when they explicitly need a bitmap. A composited render that produced no compositor tiles returns no bitmap either, since its frame is incomplete.
| bool donner::editor::RenderRequest::overviewInfillOnly = false |
True when this request should produce only a low-resolution full-document overview infill.
The worker still keeps the selected entity promoted, but skips the composited split preview and publishes a full-canvas tile. The UI uploads it into the retained overview cache without replacing active viewport-bounded tiles.
| ViewportState donner::editor::RenderRequest::viewport |
Live editor viewport rasterViewport was derived from.
Carried through the worker untouched so presentation can place the resulting pixels with the same screen transform they were rasterized against. Placing them through a later viewport would stretch a viewport-bounded raster past the document region it actually covers.