Donner 0.8.0-pre
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 worker result this frame"); setLatestBackendMs fills it in if a render result lands during the same UI frame.
void setLatestBackendMs (float ms)
 Record an 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 worker latency have a persistent value.
void setLatestFrameCost (const FrameCostBreakdown &cost)
 Record the editor render-cost breakdown for the most recently pushed frame. No-op if no frame has been pushed yet.
void setLatestMemorySample (const FrameMemorySample &sample)
 Record presentation-memory counters for the most recently pushed frame. No-op if no frame has been pushed yet.
FrameMemorySample latestNonZeroMemorySample () const
 Return the newest non-zero presentation-memory sample, or zeroes if none exist.
float latest () const
float latestBackend () const
 Return the async worker timing that landed on the newest frame, or zero.
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/presentation latency (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::array< FrameProfilerSample, kFrameHistoryCapacity > profiler {}
 Known frame-cost divisions drawn as the color-bar profiler.
std::array< FrameMemorySample, kFrameHistoryCapacity > memory {}
 Presentation memory retained by the editor texture cache.
std::size_t writeIndex = 0
std::size_t samples = 0
float lastBackendMs = 0.0f
 Most recent non-zero worker sample, so latched-worker-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: