1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
45use rustc_hash::FxHashSet;
67mod skip_fully_covered_layers;
8mod skip_trivial_clips;
9mod tile_unchanged;
1011pub 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;
1415#[derive(Clone, Debug)]
16pub struct PassesSharedState {
17pub skip_clipping: FxHashSet<u32>,
18pub layers_were_removed: bool,
19}
2021impl Default for PassesSharedState {
22fn default() -> Self {
23Self { layers_were_removed: true, skip_clipping: FxHashSet::default() }
24 }
25}
2627impl PassesSharedState {
28pub fn reset(&mut self) {
29self.skip_clipping.clear();
30self.layers_were_removed = true;
31 }
32}