use crate::kvasir::graph::{KvasirGraph, NodeKey};
pub struct CachedGraphPlan {
pub has_glass: bool,
pub has_bloom: bool,
pub has_accessibility: bool,
pub has_volumetric: bool,
pub active_offscreens_count: usize,
pub portal_regions_count: usize,
pub width: u32,
pub height: u32,
pub scale_bits: u32,
pub graph: KvasirGraph,
pub plan: Vec<NodeKey>,
}
impl CachedGraphPlan {
pub fn matches(
&self,
has_glass: bool,
has_bloom: bool,
has_accessibility: bool,
has_volumetric: bool,
active_offscreens_count: usize,
portal_regions_count: usize,
width: u32,
height: u32,
scale_bits: u32,
) -> bool {
self.has_glass == has_glass
&& self.has_bloom == has_bloom
&& self.has_accessibility == has_accessibility
&& self.has_volumetric == has_volumetric
&& self.active_offscreens_count == active_offscreens_count
&& self.portal_regions_count == portal_regions_count
&& self.width == width
&& self.height == height
&& self.scale_bits == scale_bits
}
}