|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Design doc 0033 §M4 - cancellation handle for CompositorController:: renderFrame. The token wraps a single std::atomic<bool>; the compositor's per-layer / per-segment rasterize loops poll isCancelled() at coarse safe points (between rasterizeLayer / rasterizeStaticSegment calls, not mid-rasterize, per design doc 0033 §R3 / §D4) and bail early when set. More...
#include "donner/svg/compositor/CompositorController.h"
Design doc 0033 §M4 - cancellation handle for CompositorController:: renderFrame. The token wraps a single std::atomic<bool>; the compositor's per-layer / per-segment rasterize loops poll isCancelled() at coarse safe points (between rasterizeLayer / rasterizeStaticSegment calls, not mid-rasterize, per design doc 0033 §R3 / §D4) and bail early when set.
Cancellation is best-effort: a partially-rasterized frame leaves the compositor's segment / layer dirty flags in their pre-rasterize state, so the next renderFrame finishes the work without duplicating it. The caller (worker) discards the (incomplete) takeSnapshot result on cancel and restarts with the latest pendingRequest_.