Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
RenderCoordinator.h File Reference
#include <chrono>
#include <cstdint>
#include <limits>
#include <memory>
#include <optional>
#include <vector>
#include "donner/base/Box.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"
Include dependency graph for RenderCoordinator.h:
This graph shows which files directly or indirectly include this file:

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::optional< SelectTool::ActiveDragPreviewdonner::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::ActiveGesturePreviewdonner::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.

Function Documentation

◆ OverlayGesturePreviewForPresentation()

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 )
nodiscard

Project live gesture chrome, including the selection size/angle chip, to the overlay state.

Parameters
activeGesturePreviewLive gesture preview from the select tool.
liveDragPreviewLive drag transform currently applied to the DOM.
representedDragPreviewDrag transform the overlay/content presentation represents.

◆ OverlayRepresentedDocumentFromLiveDocument()

Transform2d donner::editor::OverlayRepresentedDocumentFromLiveDocument ( const std::optional< SelectTool::ActiveDragPreview > & liveDragPreview,
const std::optional< SelectTool::ActiveDragPreview > & representedDragPreview )
nodiscard

Return the document transform that projects live drag chrome onto the represented presentation.

Parameters
liveDragPreviewLive drag transform currently applied to the DOM.
representedDragPreviewDrag transform the presented content represents.

◆ OverlayRepresentedDragPreviewForPresentation()

std::optional< SelectTool::ActiveDragPreview > donner::editor::OverlayRepresentedDragPreviewForPresentation ( const std::optional< SelectTool::ActiveDragPreview > & activeDragPreview,
const std::optional< SelectTool::ActiveDragPreview > & displayedDragPreview,
bool hasPresentableActiveDragTarget )
nodiscard

Return the drag transform that overlay chrome should represent in the current presentation frame.

Parameters
activeDragPreviewActive drag transform used by the presenter when a drag target tile is available.
displayedDragPreviewDrag transform represented by the currently cached content.
hasPresentableActiveDragTargetTrue when the presenter can draw a matching drag target tile this frame.

◆ ShouldPresentCompositedPreviewForViewport()

bool donner::editor::ShouldPresentCompositedPreviewForViewport ( const RenderResult::CompositedPreview & preview,
const Vector2i & viewportDesiredCanvas )
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.

Parameters
previewWorker-produced composited preview.
viewportDesiredCanvasCanvas size implied by the current UI-frame viewport.