Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::svg::compositor::CompositorConfig Struct Reference

Runtime feature gates for CompositorController. More...

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

Public Attributes

bool autoPromoteInteractions = true
 Editor-published InteractionHint hints promote the selected / dragged entity to its own layer. When false, the editor falls back to the explicit promoteEntity escape hatch.
bool autoPromoteAnimations = true
 Animation-system-published hints promote animated subtrees so per-tick cost stays O(animated subtree). When false, animations re-render the whole document per tick; selection / drag compositing is unaffected.
bool complexityBucketing = true
 ComplexityBucketer pre-splits the document into a small number of layers at load / structural rebuild to reduce click-to-first-drag-update latency. When false, the root layer stays monolithic.
bool verifyPixelIdentity = false
 When true, renderFrame additionally runs a full-document reference render after the composited path completes and asserts pixel identity via UTILS_RELEASE_ASSERT. Doubles per-frame cost — intended for CI compositor test targets and --config=compositor-debug local runs, not for interactive editor use. See 0025 § Dual-path debug assertion.
bool tightBoundedSegments = true
 When true, rasterizeDirtyStaticSegments calls RendererDriver::computeEntityRangeBounds and sizes each segment's offscreen bitmap to the tight canvas-space rectangle its contents paint into (with a 1-px AA padding + 75% coverage cutoff). When false, every segment rasterizes full-canvas — slower and more memory, but bypasses every code path added in design doc 0027, which is the bisection fast-path for any visual regression suspected to originate in tight-bounded rasterization.

Detailed Description

Runtime feature gates for CompositorController.

Each field toggles an independent auto-promotion source. The primary kill-switch — "don't use the compositor at all" — is a linkage / construction decision: a consumer that doesn't want compositing simply doesn't instantiate a CompositorController. These gates only affect what hint sources run inside a live compositor.

Default-constructed config has all features enabled. Mandatory hints (opacity < 1, filter, mask, blend-mode, isolation) are always active — they implement SVG semantics, not an optional optimization, and cannot be disabled through config.

See 0025-composited_rendering.md § Reversibility.

Member Data Documentation

◆ autoPromoteAnimations

bool donner::svg::compositor::CompositorConfig::autoPromoteAnimations = true

Animation-system-published hints promote animated subtrees so per-tick cost stays O(animated subtree). When false, animations re-render the whole document per tick; selection / drag compositing is unaffected.

◆ autoPromoteInteractions

bool donner::svg::compositor::CompositorConfig::autoPromoteInteractions = true

Editor-published InteractionHint hints promote the selected / dragged entity to its own layer. When false, the editor falls back to the explicit promoteEntity escape hatch.

◆ complexityBucketing

bool donner::svg::compositor::CompositorConfig::complexityBucketing = true

ComplexityBucketer pre-splits the document into a small number of layers at load / structural rebuild to reduce click-to-first-drag-update latency. When false, the root layer stays monolithic.

◆ tightBoundedSegments

bool donner::svg::compositor::CompositorConfig::tightBoundedSegments = true

When true, rasterizeDirtyStaticSegments calls RendererDriver::computeEntityRangeBounds and sizes each segment's offscreen bitmap to the tight canvas-space rectangle its contents paint into (with a 1-px AA padding + 75% coverage cutoff). When false, every segment rasterizes full-canvas — slower and more memory, but bypasses every code path added in design doc 0027, which is the bisection fast-path for any visual regression suspected to originate in tight-bounded rasterization.

Flipping the field at runtime (via CompositorController::setTightBoundedSegmentsEnabled) marks all cached segments dirty so the next frame re-rasterizes under the new policy. See 0027-tight_bounded_segments.md § Reversibility.

◆ verifyPixelIdentity

bool donner::svg::compositor::CompositorConfig::verifyPixelIdentity = false

When true, renderFrame additionally runs a full-document reference render after the composited path completes and asserts pixel identity via UTILS_RELEASE_ASSERT. Doubles per-frame cost — intended for CI compositor test targets and --config=compositor-debug local runs, not for interactive editor use. See 0025 § Dual-path debug assertion.

Default is false; CI and debug test configurations flip it on for the covered test targets.


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