mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 08:52:26 +00:00
Before drawing a shape, the renderer checks that its control points stay within the rasterizer's limits. For a long path it measured every point of the path for this check in each frame. The kept path of a long path now keeps the box of the points of each run of segments next to the run's bounds, updates it with the runs an edit changes, and answers the check from those boxes. With a closed path of 200,000 anchors and no paint (release build, single-threaded, medians of 21 frames), the part of the frame redrawn after one anchor moves took 1.93 ms instead of 2.69 ms, and drawing the same part again with nothing changed took 0.015 ms instead of 0.343 ms.