Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::repro::ReplayExecutionResourceBudget Class Reference

Aggregate runtime budget for replay frames and semantic actions. More...

#include "donner/editor/repro/ReplayResourceBudget.h"

Public Member Functions

bool reserveFrame (std::size_t physicalPixels)
 Reserve one frame and its physical pixel count before rendering it.
bool reserveAction (const ReplaySemanticActionCost &cost)
 Reserve a semantic action before invoking its mutation callback.
bool reserveInput (const ReplayInputFrameCost &cost)
 Reserve raw-input work before dispatching the input frame.
std::size_t frames () const
 Return the number of reserved playback frames.
std::size_t pixelFrames () const
 Return the cumulative reserved physical pixel count.
std::size_t actions () const
 Return the number of reserved semantic actions.
std::size_t selectionMutations () const
 Return the cumulative reserved selection mutations.
std::size_t inputMutations () const
 Return the cumulative reserved input mutations.
std::size_t weightedWorkBytes () const
 Return the cumulative estimated work in bytes.
bool rejected () const
 Return whether any reservation has been refused.

Static Public Attributes

static constexpr std::size_t kMaximumPlaybackFrames = 1'024
 Maximum number of playback frames in one replay.
static constexpr std::size_t kMaximumPixelFrames = 128 * 1024 * 1024
 Maximum cumulative physical pixels across playback frames.
static constexpr std::size_t kMaximumActions = 4'096
 Maximum cumulative semantic actions.
static constexpr std::size_t kMaximumSelectionMutations = kMaximumReplaySelectionMutations
 Maximum cumulative selection mutations.
static constexpr std::size_t kMaximumInputMutations = 8'192
 Maximum cumulative raw-input mutations.
static constexpr std::size_t kMaximumWeightedWorkBytes = 128 * 1024 * 1024
 Maximum cumulative estimated replay work in bytes.

Detailed Description

Aggregate runtime budget for replay frames and semantic actions.

Member Function Documentation

◆ reserveAction()

bool donner::editor::repro::ReplayExecutionResourceBudget::reserveAction ( const ReplaySemanticActionCost & cost)
inlinenodiscard

Reserve a semantic action before invoking its mutation callback.

Parameters
costEstimated action, selection, and weighted work charges.
Returns
True when accepted; false after a prior refusal, invalid cost, or over-limit charge.

◆ reserveFrame()

bool donner::editor::repro::ReplayExecutionResourceBudget::reserveFrame ( std::size_t physicalPixels)
inlinenodiscard

Reserve one frame and its physical pixel count before rendering it.

Parameters
physicalPixelsWidth times height in physical pixels.
Returns
True when accepted; false after a prior refusal or an over-limit charge.

◆ reserveInput()

bool donner::editor::repro::ReplayExecutionResourceBudget::reserveInput ( const ReplayInputFrameCost & cost)
inlinenodiscard

Reserve raw-input work before dispatching the input frame.

Parameters
costEstimated input, selection, and weighted work charges.
Returns
True when accepted; false after a prior refusal, invalid cost, or over-limit charge.

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