M4.5: RAM preview: render options in the frame key, least-recently-shown eviction, stale frames freed at once
- `FrameKey` carries a hash of the render options (`frames::opts_hash`): switching Fast Previews (Draft / Fast Draft) or Realtime Shadows no longer shows frames rendered the other way. - Eviction drops the least recently shown frame (`Frames::get` touches it), not the oldest inserted: a looping preview a little over budget no longer evicts the frame it shows next. - Frames of earlier project revisions are dropped on every change (`Frames::drop_stale`); they could never be shown again but held memory (and GPU textures) until evicted. - The green cache bars (Timeline, Preview panel) count the frames of exactly what the viewer shows — scale, 3D view / region of interest and options (`EffectcraftApp::shown_series`) — instead of any frame at that scale. - Playback loops compute the key's fixed part once (`EffectcraftApp::frame_series`). - Docs: architecture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
249cc145e3
commit
5648fdb1c2
@@ -105,7 +105,7 @@ fn viewer_frames_render_remotely_from_project_diffs() {
|
||||
let comp = s.active_comp_id().unwrap();
|
||||
let c = s.project.comp(comp).unwrap().clone();
|
||||
let opts = RenderOpts { scale: 0.25, guides: true, ..Default::default() };
|
||||
let key = |rev: u64, f: i64| FrameKey { revision: rev, comp: comp.0, frame: f, scale: 250, view: 0 };
|
||||
let key = |rev: u64, f: i64| FrameKey { revision: rev, comp: comp.0, frame: f, scale: 250, view: 0, opts: 0 };
|
||||
let worker = Arc::new(FakeWorker::new(&s, 2));
|
||||
let mut frames = Frames::default();
|
||||
frames.set_remote(Some(worker.clone()));
|
||||
|
||||
Reference in New Issue
Block a user