mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 12:32:52 +00:00
vello_cpu keeps every path's coverage (alpha) values in one buffer until
the scene is rasterized, and a strip packs its index into that buffer in
31 bits; Strip::new asserts it fits. A page that painted one form 2^22
times over (22 nested forms, each drawing the next twice) grew the
buffer past 2^31 values at about 7 GB and panicked, and the page failed.
- vello_common (2): StripStorage::room_for_path{,_within} says whether
one more path's coverage, at most the whole surface counted twice,
still fits below that limit or a smaller one.
- vello_cpu (1): the single-threaded dispatcher leaves out fills,
strokes, fast rectangles and layer clips once there is no room,
records it (RenderContext::coverage_full) and can be kept to fewer
values (set_max_coverage).
- hayro (31): RenderSettings::max_coverage passes that limit down, and
a page whose paths were left out reports
InterpreterWarning::ContentTruncated, which PdfCraft already shows as
content skipped past the page's safety budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn