Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::FrameAttemptStats Struct Reference

Owner-thread counters; index zero is scheduled work and index one is an event frame. More...

#include "donner/editor/FrameCallbackAdmission.h"

Public Member Functions

bool admit (bool eventFrame, bool frameActive, bool gpuActive)
 Record the existing admission decision without changing either guard.
void finish (bool eventFrame, bool didRender)
 Count an admitted callback's outcome.

Public Attributes

std::array< uint64_t, 2 > attempts {}
 Admission attempts.
std::array< uint64_t, 2 > idle {}
 Admitted callbacks that did not run a full UI frame.
std::array< uint64_t, 2 > rendered {}
 Admitted callbacks that ran a full UI frame.
uint64_t blockedByFrame = 0
 Attempts made while another UI frame was active.
uint64_t blockedByGpu = 0
 Attempts made while a GPU owner callback was active.
std::optional< bool > lastRenderedEventFrame
 Whether the most recent full UI frame was an event frame; unset before the first one.

Detailed Description

Owner-thread counters; index zero is scheduled work and index one is an event frame.

Member Function Documentation

◆ admit()

bool donner::editor::FrameAttemptStats::admit ( bool eventFrame,
bool frameActive,
bool gpuActive )
inline

Record the existing admission decision without changing either guard.

Parameters
eventFrameWhether this is a completion-event callback.
frameActiveWhether another UI frame is active.
gpuActiveWhether a GPU owner callback is active.

◆ finish()

void donner::editor::FrameAttemptStats::finish ( bool eventFrame,
bool didRender )
inline

Count an admitted callback's outcome.

Parameters
eventFrameEvent vs scheduled callback.
didRenderWhether the callback ran a full UI frame (not proof of surface presentation).

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