Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::compositor::ComplexityBucketerConfig Struct Reference

Runtime configuration for ComplexityBucketer. More...

#include "donner/svg/compositor/ComplexityBucketer.h"

Public Attributes

uint32_t targetBucketCount = 4
 Total layer slots available to the bucketer, including reserved slots. The default four with one reserved slot permits at most three geometry buckets.
uint32_t reservedSlots = 1
 Slots reserved for non-bucket hint sources (interactive layer, animation, etc.). Subtracted from targetBucketCount to yield the usable bucket count. Default 1 leaves room for the interactive layer.
uint32_t filterPenalty = 16
 Per-subtree cost adder when any entity in the subtree has a filter (RenderingInstanceComponent::resolvedFilter.has_value()).
uint32_t maskPenalty = 8
 Per-subtree cost adder when any entity in the subtree has a mask (RenderingInstanceComponent::mask.has_value()).
uint32_t minCostToBucket = 1
 Minimum subtree cost to be worth bucketing. Subtrees with cost below this threshold stay in the root. Default 1 (bucket every top-level child) for parity with the initial unit-test behavior; production callers should raise this to avoid carving cheap leaf elements into their own layers, which costs more than it saves and exposes correctness edge cases in RendererDriver::drawEntityRange for standalone top-level elements.

Detailed Description

Runtime configuration for ComplexityBucketer.

Defaults are fixed, hand-tuned constants. Bucket choices depend on configured thresholds and render-tree complexity, without per-user history.

Member Data Documentation

◆ filterPenalty

uint32_t donner::svg::compositor::ComplexityBucketerConfig::filterPenalty = 16

Per-subtree cost adder when any entity in the subtree has a filter (RenderingInstanceComponent::resolvedFilter.has_value()).

◆ maskPenalty

uint32_t donner::svg::compositor::ComplexityBucketerConfig::maskPenalty = 8

Per-subtree cost adder when any entity in the subtree has a mask (RenderingInstanceComponent::mask.has_value()).

◆ minCostToBucket

uint32_t donner::svg::compositor::ComplexityBucketerConfig::minCostToBucket = 1

Minimum subtree cost to be worth bucketing. Subtrees with cost below this threshold stay in the root. Default 1 (bucket every top-level child) for parity with the initial unit-test behavior; production callers should raise this to avoid carving cheap leaf elements into their own layers, which costs more than it saves and exposes correctness edge cases in RendererDriver::drawEntityRange for standalone top-level elements.

◆ reservedSlots

uint32_t donner::svg::compositor::ComplexityBucketerConfig::reservedSlots = 1

Slots reserved for non-bucket hint sources (interactive layer, animation, etc.). Subtracted from targetBucketCount to yield the usable bucket count. Default 1 leaves room for the interactive layer.

◆ targetBucketCount

uint32_t donner::svg::compositor::ComplexityBucketerConfig::targetBucketCount = 4

Total layer slots available to the bucketer, including reserved slots. The default four with one reserved slot permits at most three geometry buckets.


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