M4.14: content-keyed RAM preview frames; proxies in the disk cache's content key
- FrameKey's identity is the comp's content (frames::comp_content), not the project revision: an edit keeps the cached frames of comps it doesn't touch and undo finds the frames of the state it returns to. The identity hashes the addresses of the comps a comp draws (~0.1 ms on the 1500-layer test project; the full content hash took ~117 ms), by value the footage, solids, proxies and project settings; with expressions, every item. Frames::content_of keeps a project snapshot per identity with frames (or in flight), so Arc::make_mut always copies an edited comp and its address can't be reused meanwhile; past 64 identities the least recently used go with their frames (long drags). - drop_stale is gone (frames of other contents are evicted least-recently-shown first). - disk_cache::comp_content_key covers items' proxies and Use Proxy (it served stale frames). - Tests: frames (content keys, edits elsewhere and undo, bounded drags, in-place edit safety), ui_ram_preview (end to end), the disk cache proxy key. Docs: roadmap (M4 done), parity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4f7723a7b6
commit
26c714db7f
@@ -137,7 +137,15 @@ fn gpu_worker_renders_effect_frames_and_the_disk_cache_survives_a_reload() {
|
||||
s.execute("prop.set", json!({"layer": "#1", "path": "effects/#1/blurriness", "value": 12})).unwrap();
|
||||
let opts = RenderOpts { backend: effectcraft_engine::render::Backend::Gpu, ..Default::default() };
|
||||
let t = effectcraft_engine::time::Tick::ZERO;
|
||||
let key = |comp: effectcraft_engine::project::ItemId| FrameKey { revision: s.revision, comp: comp.0, frame: 0, scale: 1000, view: 0, opts: 0 };
|
||||
let key = |comp: effectcraft_engine::project::ItemId| FrameKey {
|
||||
revision: s.revision,
|
||||
content: effectcraft_ui_egui::frames::comp_content(&s.project, comp),
|
||||
comp: comp.0,
|
||||
frame: 0,
|
||||
scale: 1000,
|
||||
view: 0,
|
||||
opts: 0,
|
||||
};
|
||||
let disk = Arc::new(Mutex::new(HashMap::new()));
|
||||
let worker = Arc::new(GpuWorker::new(&s, worker_gpu.clone(), disk.clone()));
|
||||
let mut frames = Frames::default();
|
||||
|
||||
Reference in New Issue
Block a user