mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
The renderer kept the rasters of an object's drop shadows, outer glows and filtered content (Gaussian Blur, Feather and the Photoshop-style filters), and drew them again while the object, the zoom and rotation and the ink plane stayed the same. The content drawn into a raster also reads things outside the object: patterns, symbols, brushes, images, document, layer and color settings, the knockout a group inherits, the fonts, and the options the frame is drawn with. When one of them changed, a renderer that had drawn the object went on drawing the raster it had kept, made from the old values. Each kept raster now records what its content was drawn from: which of those things the object reads, found by walking the object when the raster is made, and a hash of their values then. The renderer draws the raster only while that hash is the same in the current frame. Once a frame, the renderer hashes the document's patterns, symbols and images. It hashes their art and pixels by the addresses of their shared values, and it keeps weak references to those values while a raster made with them is kept, so no other value can take one of those addresses. A filtered raster also records the color channels its filters split, and under De-Interlace the raster resolution. A temporary release test timed the inputs of 400 kept rasters at about 10 microseconds a frame.