mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 08:29:14 +00:00
The canvas cache key held the process-wide placed-document bitmap generation, so a bitmap made for a file that only another document holds changed every document's key, and the next frame differed from the frame shown in more than the view. In the web build, which has no render worker, a heavy canvas then rendered in the middle of a pan instead of waiting until the view was still. On desktop the pan dropped its low-resolution fill, and the render worker did not copy pixels from its last frame. Each document now keeps its own value, checked once per generation change, as the plug-in key is. The value moves to the current generation when the document shows a placed document of a file whose bitmap was made. A file kept only for Undo does not count. When more bitmaps were made since the last check than are recorded, the value moves when the document shows a placed document of one of its images. After the value moves, the part of the frame to draw again comes from the bitmaps made since the last check before the move, so bitmaps made earlier for other documents no longer make the whole frame render. The canvas tests that retried or tolerated a new frame when another test made a bitmap now assert without those workarounds.