pub fn select_surface_reference_allocation( selected: bool, kind: &str, existing: bool, ) -> bool
Execute the checked shared source algorithm.