mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-27 19:47:12 -06:00
Every fill and stroke allocated a coverage mask the size of the whole canvas and painted every canvas pixel, so a vector file cost shapes × canvas area: SceneYard "Retro Desktop Movie Popups" spent 556 s per frame on one 4001×2501 Illustrator layer (568 s a frame in all). Each shape now rasterises and paints only inside its device-space bounding box (+1 px of anti-aliasing) clipped to the canvas; a stroke uses the bounds of its outline. The frame renders in 5–7 s (bench, no cache). Pixels match the whole-canvas version except a few anti-aliased edge pixels (float rounding of the re-based transform). A test checks that every pixel a shape covers lies inside its rectangle, and pins the output. (cherry picked from commit 58d369b5044bf03698f0fae6915843c3d400b1d1) (cherry picked from commit 7fdbbc5188ab5d420448f47a726bee6a046e6936) (cherry picked from commit 5efd7aa000874a3a150abd808c7bce158b713535)