Files
effectcraft/crates/host/tests
vangel76 e30f4f6435 Vector footage: faster, budget-safe clipping in the SVG/PDF rasteriser
Continuously rasterised vector footage (an A4 PDF scaled 200-400 %) is a page of
millions of pixels, and the rasteriser did page-sized work per element:

- Every path, run of text and image computed and walked a coverage mask the size of
  the whole page. Coverage and paint now run over the pixels the shape (fill, or stroke
  outline) or image can reach. A generated A4 page of 720 text-run paths and 60 strokes
  rasterises at 300 % in 0.18 s instead of 4.97 s (200 %: 0.13 s instead of 2.44 s), with
  the same pixels.
- Every clipping group copied the whole backdrop and drew on a second page-size surface,
  so deeply nested clips ran past the 512 MB surface budget and their artwork was dropped
  (at 200 % from the eighth level, at 400 % from the second). A plain clipping group (no
  soft mask, blend mode, group opacity or knockout, Normal content throughout) is now drawn
  straight onto the page when every clip is an axis-aligned rectangle covering each pixel
  the content can reach, and otherwise on a surface the size of its clip. Both give the
  same pixels; groups with a blend mode or knockout inside keep the backdrop path.

Never crash: drawing stops below 256 levels of groups, and the PDF/EPS builder keeps groups
at most 200 deep (a crafted page nesting `q ... W n` twenty thousand deep overflowed the
stack when the document was drawn or dropped).

The 596 x 842 px import size of an A4 page is unchanged: the page in points at 72 dpi,
rounded up, as After Effects takes a point as a pixel.

Refs #2895
2026-11-07 12:56:59 +01:00
..