Disk cache: drop segmentations and frames made before strokes applied in order (#1646)

Segmentations and rendered frames are keyed by their strokes, which now
segment differently where strokes overlap; bumping both versions keeps old
entries from showing the old result. Frozen mattes are stored in the project
and are untouched.
This commit is contained in:
tylerjenningsw
2026-10-27 14:13:40 -04:00
parent 818ce2ab42
commit 0f8a65f6c2
+2 -2
View File
@@ -652,7 +652,7 @@ pub fn read_layer_entry(data: &[u8]) -> Option<Buf> {
/// The disk key of a segmentation: its chain key and scale.
fn seg_key(key: u64, scale: f64) -> u128 {
let mut h = Hash128::default();
h.write(b"segmentation-v1");
h.write(b"segmentation-v2");
h.write_u64(key);
h.write_u64(scale.to_bits());
h.finish()
@@ -772,7 +772,7 @@ fn decode_layer(p: &[u8]) -> Option<Buf> {
// ---------------------------------------------------------------- content keys
/// Bump when rendering changes in a way that makes old disk entries wrong.
const RENDER_VERSION: &str = "effectcraft-render-2";
const RENDER_VERSION: &str = "effectcraft-render-3";
fn hash_debug(h: &mut Hash128, v: &impl std::fmt::Debug) {
h.write(format!("{v:?}").as_bytes());