mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-24 16:30:46 +01:00
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.
25 lines
868 B
Rust
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()
|
|
}
|
|
}
|