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.
Loading...
Searching...
No Matches
donner::editor::FrameCostBreakdown Struct Reference

Per-frame cost counters for editor rendering diagnostics. More...

#include "donner/editor/FrameCostBreakdown.h"

Classes

struct  MainFrame
 Editor-shell work that runs on the UI thread during one runFrame. More...
struct  HostFrame
 Host-window work bracketing the editor frame. More...
struct  DirectPresentation
 Direct WGPU document presentation work completed in the previous host frame. More...
struct  Overlay
 Cost counters for capturing and presenting selection/source-hover chrome. More...
struct  CompositedUpload
 Cost counters for uploading compositor tiles into presentation textures. More...
struct  CompositedRender
 Worker-side compositor raster costs for the render result that landed this UI frame. More...
struct  SourceRopes
 Cost counters for source-focus reference rope layout, simulation, and drawing. More...

Public Attributes

MainFrame mainFrame
HostFrame hostFrame
DirectPresentation directPresentation
Overlay overlay
CompositedUpload compositedUpload
CompositedRender compositedRender
SourceRopes sourceRopes
std::uint64_t documentCanvasCommitCount = 0
 Cumulative number of full-document canvas-size commits since document load.
std::uint64_t renderRequestsPosted = 0
 Cumulative number of render requests posted to the async worker since document load. Lets tests assert gesture-time scheduling behavior.
Vector2i lastCommittedCanvasSize = Vector2i::Zero()
 Most recent full-document canvas size committed through the SVG document.

Detailed Description

Per-frame cost counters for editor rendering diagnostics.


Class Documentation

◆ donner::editor::FrameCostBreakdown::MainFrame

struct donner::editor::FrameCostBreakdown::MainFrame

Editor-shell work that runs on the UI thread during one runFrame.

Class Members
double documentFlushMs = 0.0 Time spent flushing queued DOM/source mutations.
double documentSyncMs = 0.0 Time spent syncing parse markers and pending source writebacks.
double endRenderRequestMs = 0.0 Time spent issuing an end-of-frame document render request.
double layoutMs = 0.0 Time spent computing editor pane layout and viewport layout.
double menusDialogsMs = 0.0 Time spent rendering the menu bar and modal dialogs.
double overlayRefreshMs = 0.0 Time spent refreshing overlay chrome outside normal pane rendering.
double preparationMs = 0.0 Early per-frame bookkeeping before polling renderer results.
double renderPaneMs = 0.0 Time spent rendering the central document pane widgets.
double renderPollMs = 0.0 Time spent accepting a completed async render result.
double shortcutsMs = 0.0 Time spent handling global keyboard shortcuts.
double sidebarsMs = 0.0 Time spent rendering tree/layer/inspector sidebars.
double sourcePaneMs = 0.0 Time spent rendering the XML source pane, including source-focus ropes.
double splittersMs = 0.0 Time spent rendering pane splitters and the floating layer panel.

◆ donner::editor::FrameCostBreakdown::HostFrame

struct donner::editor::FrameCostBreakdown::HostFrame

Host-window work bracketing the editor frame.

Class Members
double beginFrameMs = 0.0 Time spent starting the current ImGui frame.
double previousDirectMs = 0.0 Previous end-frame time spent in the overlay/direct append pass.
double previousEndFrameMs = 0.0 Total time spent ending and presenting the previous host frame.
double previousImguiDrawMs = 0.0 Previous end-frame time spent issuing ImGui backend draw commands.
double previousImguiRenderMs = 0.0 Previous end-frame time spent in ImGui::Render.
double previousPresentMs = 0.0 Previous end-frame time spent presenting or swapping the surface.
double previousReadbackMs = 0.0 Previous end-frame time spent reading the framebuffer back to the CPU.
double previousSurfaceAcquireMs = 0.0 Previous end-frame time spent acquiring the WGPU surface texture.
double previousUnderlayMs = 0.0 Previous end-frame time spent in the document underlay direct pass.

◆ donner::editor::FrameCostBreakdown::DirectPresentation

struct donner::editor::FrameCostBreakdown::DirectPresentation

Direct WGPU document presentation work completed in the previous host frame.

Class Members
int activeTileDrawCount = 0 Active document tiles drawn.
double activeTilesMs = 0.0 Time spent drawing active document tiles.
int checkerboardDrawCount = 0 GPU draws submitted for the transparent-canvas checkerboard.
double checkerboardMs = 0.0 Time spent drawing the transparent-canvas checkerboard.
int overviewTileDrawCount = 0 Overview tiles drawn.
double overviewTilesMs = 0.0 Time spent drawing retained overview tiles under active tiles.
double rendererEndFrameMs = 0.0 Time spent ending the Geode renderer frame.
double totalMs = 0.0 Total time spent inside the document underlay callback.

◆ donner::editor::FrameCostBreakdown::Overlay

struct donner::editor::FrameCostBreakdown::Overlay

Cost counters for capturing and presenting selection/source-hover chrome.

Class Members
int aabbCount = 0 Selection axis-aligned bounding boxes captured.
Vector2i canvasSize = Vector2i::Zero() Viewport overlay size that would have been rasterized before immediate presentation.
double captureMs = 0.0 Milliseconds spent capturing live DOM selection chrome into a snapshot.
double drawMs = 0.0 Milliseconds spent drawing the captured chrome snapshot into a retained overlay payload. Zero for the editor's immediate screen-space overlay path.
int handleCount = 0 Selection transform handles captured.
bool hasLiveDragPreview = false True when a live drag preview was available while capturing the overlay.
bool hasMarquee = false True when the overlay snapshot included a marquee rectangle.
bool hasRepresentedDragPreview = false True when overlay chrome was projected to a represented drag preview for presentation.
int hoverAabbCount = 0 Source-hover axis-aligned bounding boxes captured.
int hoverPathCount = 0 Source-hover path items captured from geometry leaves.
Vector2d liveDragTranslationDoc = Vector2d::Zero() Live document-space drag translation at overlay capture time.
int pathCount = 0 Selection path items captured from geometry leaves.
uint64_t payloadBytes = 0 Approximate retained overlay payload bytes. Zero for immediate screen-space presentation.
Vector2d representedDragTranslationDoc = Vector2d::Zero() Document-space drag translation represented by the overlay presented this frame.
int selectedElementCount = 0 Document elements selected when the overlay snapshot was captured.
bool selectionBoundsOnly = false True when selected chrome used the large-selection combined-bounds LOD path.
double snapshotMs = 0.0 Milliseconds spent ending the renderer frame and acquiring a retained overlay payload. Zero for the editor's immediate screen-space overlay path.
int sourceHoverElementCount = 0 Source-hover elements included in the overlay snapshot.
double uploadMs = 0.0 Milliseconds spent handing a retained overlay payload to the presentation texture cache. Zero for the editor's immediate screen-space overlay path.

◆ donner::editor::FrameCostBreakdown::CompositedUpload

struct donner::editor::FrameCostBreakdown::CompositedUpload

Cost counters for uploading compositor tiles into presentation textures.

Class Members
int bitmapPayloadTileCount = 0 Number of tiles with a fresh CPU bitmap payload.
int immediateTileCount = 0 Number of transient immediate-mode compositor tiles.
int metadataOnlyTileCount = 0 Number of metadata-only tiles that reused an existing presentation texture.
uint64_t payloadBytes = 0 Approximate bytes carried by tiles with fresh bitmap or GPU texture payloads.
uint64_t payloadPixelArea = 0 Pixel area carried by tiles with fresh bitmap or GPU texture payloads.
int payloadTileCount = 0 Number of tiles with a fresh bitmap or GPU texture payload.
int texturePayloadTileCount = 0 Number of tiles with a fresh backend texture payload.
int tileCount = 0 Number of compositor tiles in the uploaded preview.
uint64_t tilePixelArea = 0 Pixel area represented by every tile, including metadata-only reuse.
double uploadMs = 0.0 Milliseconds spent in the presentation texture cache upload path.

◆ donner::editor::FrameCostBreakdown::CompositedRender

struct donner::editor::FrameCostBreakdown::CompositedRender

Worker-side compositor raster costs for the render result that landed this UI frame.

Class Members
double cachedMs = 0.0 Milliseconds spent rendering retained cached segment/layer tiles.
int cachedTileCount = 0 Cached segment/layer tiles rendered this frame.
double immediateMs = 0.0 Milliseconds spent rendering transient immediate-mode spans.
int immediateTileCount = 0 Immediate-mode static spans rendered this frame.

◆ donner::editor::FrameCostBreakdown::SourceRopes

struct donner::editor::FrameCostBreakdown::SourceRopes

Cost counters for source-focus reference rope layout, simulation, and drawing.

Class Members
int activeStateCount = 0 Number of active rope simulation states retained after pruning.
int candidateCount = 0 Number of links considered from the active focus partition.
int culledCount = 0 Number of links culled before draw because their route is outside the visible text region.
double drawMs = 0.0 Milliseconds spent issuing ImGui draw commands for source reference links.
int drawnCount = 0 Number of links drawn this frame.
int laidOutCount = 0 Number of links with a visible screen-space connector layout.
double layoutMs = 0.0 Milliseconds spent mapping source reference links to screen-space connector layout.
int staticDrawnCount = 0 Number of overflow links drawn as static connectors instead of animated ropes.
double updateMs = 0.0 Milliseconds spent updating rope simulation/path/hit-test state.

Member Data Documentation

◆ compositedRender

CompositedRender donner::editor::FrameCostBreakdown::compositedRender

◆ compositedUpload

CompositedUpload donner::editor::FrameCostBreakdown::compositedUpload

◆ directPresentation

DirectPresentation donner::editor::FrameCostBreakdown::directPresentation

◆ documentCanvasCommitCount

std::uint64_t donner::editor::FrameCostBreakdown::documentCanvasCommitCount = 0

Cumulative number of full-document canvas-size commits since document load.

◆ hostFrame

HostFrame donner::editor::FrameCostBreakdown::hostFrame

◆ lastCommittedCanvasSize

Vector2i donner::editor::FrameCostBreakdown::lastCommittedCanvasSize = Vector2i::Zero()

Most recent full-document canvas size committed through the SVG document.

◆ mainFrame

MainFrame donner::editor::FrameCostBreakdown::mainFrame

◆ overlay

Overlay donner::editor::FrameCostBreakdown::overlay

◆ renderRequestsPosted

std::uint64_t donner::editor::FrameCostBreakdown::renderRequestsPosted = 0

Cumulative number of render requests posted to the async worker since document load. Lets tests assert gesture-time scheduling behavior.

◆ sourceRopes

SourceRopes donner::editor::FrameCostBreakdown::sourceRopes

The documentation for this struct was generated from the following file: