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

Aggregate filter-graph preparation and source-image materialization budget for one frame. More...

#include "donner/svg/renderer/RendererInterface.h"

Classes

struct  Limits
 Per-frame capacity for filter preparation. More...

Public Member Functions

void reset ()
 Clears per-frame counters and the sticky rejection state.
bool beginGraph ()
 Records one graph attempt, or latches rejection when the attempt cap is exhausted.
bool reserveNodes (std::size_t count)
 Reserves graph nodes and counts a prepared graph on success.
bool reserveImageBytes (std::uint64_t count)
 Reserves source-image bytes against the aggregate image limit.
bool reserveMaterializationBytes (std::uint64_t count)
 Reserves bytes for source-image materialization.
bool reservePayloadBytes (std::uint64_t count)
 Reserves retained filter payload bytes.
bool reserveShadowEntities (std::size_t count)
 Reserves entities created while preparing filter shadows.
std::size_t attempts () const
 Number of graph attempts in this frame.
std::size_t graphs () const
 Number of graphs whose nodes were successfully reserved.
std::size_t nodes () const
 Aggregate reserved graph nodes.
std::uint64_t imageBytes () const
 Aggregate reserved source-image bytes.
std::uint64_t materializationBytes () const
 Aggregate reserved materialized-image bytes.
std::uint64_t payloadBytes () const
 Aggregate reserved filter payload bytes.
std::size_t shadowEntities () const
 Aggregate reserved shadow entities.
bool rejected () const
 Whether a capacity check has failed in this frame.
void setLimitsForTesting (Limits limits)
 Tightens test limits without raising any existing capacity.

Static Public Attributes

static constexpr std::size_t kMaximumGraphs
 Maximum filter graph attempts in one frame.
static constexpr std::size_t kMaximumNodes
 Maximum aggregate nodes across those graph attempts.
static constexpr std::uint64_t kMaximumImageBytes = 4ULL * 1024 * 1024
 Maximum aggregate source-image bytes prepared in one frame.
static constexpr std::uint64_t kMaximumMaterializationBytes = 2 * kMaximumImageBytes
 Maximum aggregate source-image materialization bytes.
static constexpr std::uint64_t kMaximumPayloadBytes = 16ULL * 1024 * 1024
 Maximum aggregate retained filter payload bytes.
static constexpr std::size_t kMaximumShadowEntities = 4096
 Maximum entities introduced while preparing shadow/filter resources.

Detailed Description

Aggregate filter-graph preparation and source-image materialization budget for one frame.


Class Documentation

◆ donner::svg::RendererFilterPreparationBudget::Limits

struct donner::svg::RendererFilterPreparationBudget::Limits

Per-frame capacity for filter preparation.

Class Members
size_t graphs = kMaximumGraphs Graph attempts.
uint64_t imageBytes = kMaximumImageBytes Source-image bytes.
uint64_t materializationBytes Materialized image bytes.
size_t nodes = kMaximumNodes Total graph nodes.
uint64_t payloadBytes = kMaximumPayloadBytes Retained payload bytes.
size_t shadowEntities = kMaximumShadowEntities Shadow entities.

Member Data Documentation

◆ kMaximumGraphs

std::size_t donner::svg::RendererFilterPreparationBudget::kMaximumGraphs
staticconstexpr
Initial value:
=
static constexpr std::uint64_t kMaximumExecutions
Maximum number of graph executions, including zero-area and otherwise inexpensive graphs.
Definition FilterGraph.h:1087

Maximum filter graph attempts in one frame.

◆ kMaximumNodes

std::size_t donner::svg::RendererFilterPreparationBudget::kMaximumNodes
staticconstexpr
Initial value:
=
static constexpr std::size_t kMaximumGraphs
Maximum filter graph attempts in one frame.
Definition RendererInterface.h:265
constexpr std::size_t kMaximumFilterGraphNodes
Maximum number of primitives retained in one computed filter graph.
Definition FilterGraph.h:65

Maximum aggregate nodes across those graph attempts.


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