|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
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_.