mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 10:09:32 -06:00
Cause: pipeline::Cx::render_at built the job's Renderer without a layer cache, so every layer of every frame rendered from scratch (source, masks, effects, styles), and the GPU compositor, whose uploads are keyed by the cached buffers, uploaded every layer again on every frame. Fix: each job (Cx) owns a LayerCache, the cache type the viewer uses, with its default budget (1 GiB, the default Settings > Memory & CPU layer cache), shared by the job's parallel frames and dropped with the job. With deferred GPU readbacks it holds the accelerator's miss gate, as the job workers' caches do. Cx::renderer builds the job's renderer (options, accelerator, cache) for render_at and the test. Tests: pipeline::tests::layers_render_once_per_job exports ten frames of a solid animated only in Transform: the cache misses of the first frame are the only ones (it fails without the cache: no layer is cached), and every frame equals the frame rendered without the cache. Diagnosis by @pat-the-wizard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>