mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-31 07:38:24 +00:00
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:
1 parent
818ce2ab42
commit
0f8a65f6c2
1 file changed
+2
-2
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user