Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::FrameHistory Struct Reference
Collaboration diagram for donner::editor::FrameHistory:
[legend]

Public Member Functions

void push (float ms)
 Append a new frame sample. The matching backendMs[] slot is reset to 0 ("no backend result this frame"); setLatestBackendMs fills it in if a render result lands during the same UI frame.
void setLatestBackendMs (float ms)
 Record a backend (async-renderer worker) timing for the most recently pushed frame. Called by RenderCoordinator::pollRenderResult when a new RenderResult arrives. No-op if no frame has been pushed yet. Also updates lastBackendMs so UI elements that want to show the latest measured backend latency have a persistent value.
float latest () const
float max () const

Public Attributes

std::array< float, kFrameHistoryCapacity > deltaMs {}
 ImGui frame delta per UI-thread frame — populated from ImGui::GetIO().DeltaTime by noteFrameDelta.
std::array< float, kFrameHistoryCapacity > backendMs {}
 Async-renderer worker time (ms) per UI frame, aligned 1:1 with the matching deltaMs[] slot. Holds 0.0f for frames where no render result landed (the worker was still busy or nothing was requested); consumers skip zero entries so the graph doesn't drop to zero between drags.
std::size_t writeIndex = 0
std::size_t samples = 0
float lastBackendMs = 0.0f
 Most recent non-zero backend sample, so latched-backend-latency readers (the numeric readout, sticky-line rendering) have something to show between render-result landings.

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