mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 09:05:51 +00:00
Disk cache: layer entries store the whole modification time
Layer entries share the frame entries' file list layout, which now stores the full i128 modification time: the layer entry format version goes to layer-entry-files-2. The module doc names the font files text is drawn with among an entry's source files, and what keeps a list incomplete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c925f1e190
commit
eeff6f44ff
1 file changed
+7
-5
@@ -8,10 +8,12 @@
|
||||
//! items a buffer uses with their settings and paths) and the renderer version
|
||||
//! ([`layer_disk_key`]). A changed project therefore never reads stale pixels: its keys simply
|
||||
//! change.
|
||||
//! * Frame and layer entries keep the source files they were made of, each with the size and
|
||||
//! modification time it was read with ([`EntryFiles`], #3184). An entry is used only while
|
||||
//! those files are unchanged: a handful of `metadata` calls when it is read, never a scan of
|
||||
//! the project's files. A frame or buffer whose files can't all be named is not stored.
|
||||
//! * Frame and layer entries keep the source files they were made of (footage, and the font
|
||||
//! files text is drawn with), each with the size and modification time it was read with
|
||||
//! ([`EntryFiles`], #3184). An entry is used only while those files are unchanged: a handful
|
||||
//! of `metadata` calls when it is read, never a scan of the project's files. A frame or
|
||||
//! buffer whose files can't all be named is not stored (text in a family that isn't installed
|
||||
//! or with fallback glyphs, footage refused by automation read roots, …).
|
||||
//! * Payloads are LZ4-compressed (`lz4_flex`, MIT): frames as 8-bit premultiplied RGBA (or, for
|
||||
//! 32 bpc viewer frames, half-float RGBA with the bytes shuffled into planes; the entry
|
||||
//! header's format byte tells them apart: 2 and 3, both with their source files first), layer
|
||||
@@ -1165,7 +1167,7 @@ pub type SharedVirtualFileId = Arc<dyn Fn(&str) -> Option<(u64, u64)> + Send + S
|
||||
/// Layer entries with their source files (#3184), part of every layer disk key: entries of the
|
||||
/// earlier format (keyed by a project-wide footage salt instead) are never looked up again;
|
||||
/// least recently used, they are evicted.
|
||||
const LAYER_ENTRY_VERSION: &[u8] = b"layer-entry-files-1";
|
||||
const LAYER_ENTRY_VERSION: &[u8] = b"layer-entry-files-2";
|
||||
|
||||
/// Disk key of a layer buffer: the layer cache's content key ([`crate::cache::layer_key`] and
|
||||
/// the keys derived from it), the layer entry format and the renderer version. The content key
|
||||
|
||||
Reference in new issue
Block a user