Merge pull request #793 from vangel76/fix-595-prefetch-order

#595: RAM preview prefetches nearest the playhead and keeps the frames just ahead
This commit is contained in:
Brandon Thomas
2026-10-12 03:22:56 -04:00
3 changed files with 192 additions and 15 deletions
+2 -2
View File
@@ -2425,9 +2425,9 @@ fn show_frame(app: &mut EffectcraftApp, ctx: &egui::Context, key: crate::frames:
FrameImage::Cpu(img) => {
// Frames wider or taller than the GPU's texture limit go up averaged down too (#201).
let max = crate::frames::max_texture_side(ctx);
let fitted = crate::frames::fit_texture_by((*img).clone(), max, minify);
let fitted = crate::frames::fit_shared_texture_by(&img, max, minify);
match &mut app.viewer_tex {
Some((tex, k, m)) if tex.size() == fitted.size => {
Some((tex, k, m)) if tex.size() == fitted.size() => {
tex.set(fitted, opts);
(*k, *m) = (key, minify);
}