mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
A CMYK document that shows transparency is drawn as two ink planes, and ink::compose turned them into screen colors one pixel at a time on one thread. At 2880 x 1800 that took about as long as drawing one plane of 50,000 paths. The renderer also searched a CMYK document for transparency in every frame. compose now splits the frame into bands, as many as the renderer has threads and no more than one per 65,536 pixels. The calling thread composes the first band and a scoped thread composes each other band, with the same per-pixel code. The renderer keeps the answer of the transparency test with the layers, symbol art and pattern art it was found for, held weakly, and tests again only when the document holds other art. With Overprint Preview on, a document whose layers or symbols hold an overprinting fill or stroke is still tested in every frame. FrameStats::ink_threads reports how many threads composed a frame. On 8 threads at 2880 x 1800, a page of 300 shapes at 20% to 90% opacity takes 30 ms a frame instead of 55 ms, and 50,000 paths with one at 99% opacity take 258 ms instead of 361 ms, with the same pixels. Docs: docs/target-app-parity.md.