surpass/painter/layer_workbench/passes/
mod.rs1use rustc_hash::FxHashSet;
6
7mod skip_fully_covered_layers;
8mod skip_trivial_clips;
9mod tile_unchanged;
10
11pub use skip_fully_covered_layers::skip_fully_covered_layers_pass;
12pub use skip_trivial_clips::skip_trivial_clips_pass;
13pub use tile_unchanged::tile_unchanged_pass;
14
15#[derive(Clone, Debug)]
16pub struct PassesSharedState {
17 pub skip_clipping: FxHashSet<u32>,
18 pub layers_were_removed: bool,
19}
20
21impl Default for PassesSharedState {
22 fn default() -> Self {
23 Self { layers_were_removed: true, skip_clipping: FxHashSet::default() }
24 }
25}
26
27impl PassesSharedState {
28 pub fn reset(&mut self) {
29 self.skip_clipping.clear();
30 self.layers_were_removed = true;
31 }
32}