Files
texturecraft/crates/compose/src/held_fields.rs
T
chasse20 6825aac7e4 Auto: Integrate main and reduce compositor buffer lifetimes
Preserve filter lookahead alongside main image-cache invalidation and input
bounds. Move HeldFields into its own module and finish scoped cleanup.
Charge repeated USD path names before allocating retained strings.
Reuse the blur transpose-back buffer and release scattered texels before
allocating filter temporaries.

Validated compose/engine release tests, Clippy, layering, wasm and formatting.
2026-11-15 07:14:57 +00:00

25 lines
868 B
Rust

use std::collections::BTreeSet;
use std::sync::Arc;
use crate::below::StackKey;
use crate::eval::Fields;
/// Neighbourhood-filter fields kept between the composites of one pass.
pub(crate) struct HeldFields {
/// Everything the fields read.
pub key: Arc<StackKey>,
/// The working size they were built at.
pub size: (u32, u32),
/// The tiles every layer's fields hold.
pub stack_tiles: BTreeSet<(u32, u32)>,
/// The tiles the hot layer's fields hold (the same tiles when the stack was not split).
pub hot_tiles: BTreeSet<(u32, u32)>,
pub fields: Arc<Fields>,
}
impl std::fmt::Debug for HeldFields {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("HeldFields").field("stack_tiles", &self.stack_tiles.len()).field("hot_tiles", &self.hot_tiles.len()).finish_non_exhaustive()
}
}