From d7da3ac12a0ddd47bc72871ded511d896aa41482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 6 Nov 2024 16:19:09 +0100 Subject: [PATCH] Expose scan_for_image_keys and scan_for_font_keys --- azul-core/src/styled_dom.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/azul-core/src/styled_dom.rs b/azul-core/src/styled_dom.rs index 868319f1..8c850681 100644 --- a/azul-core/src/styled_dom.rs +++ b/azul-core/src/styled_dom.rs @@ -2915,19 +2915,17 @@ impl StyledDom { } /// Scans the display list for all font IDs + their font size - #[cfg(feature = "multithreading")] - pub(crate) fn scan_for_font_keys( + pub fn scan_for_font_keys( &self, resources: &RendererResources, ) -> FastHashMap> { use crate::app_resources::font_size_to_au; use crate::dom::NodeType::*; - use rayon::prelude::*; let keys = self .node_data .as_ref() - .par_iter() + .iter() .enumerate() .filter_map(|(node_id, node_data)| { let node_id = NodeId::new(node_id); @@ -2980,8 +2978,7 @@ impl StyledDom { } /// Scans the display list for all image keys - #[cfg(feature = "multithreading")] - pub(crate) fn scan_for_image_keys( + pub fn scan_for_image_keys( &self, css_image_cache: &ImageCache, ) -> FastBTreeSet { @@ -2996,15 +2993,13 @@ impl StyledDom { clip_mask: Option, } - use rayon::prelude::*; - let default_backgrounds: StyleBackgroundContentVec = Vec::new().into(); let images = self .node_data .as_container() .internal - .par_iter() + .iter() .enumerate() .map(|(node_id, node_data)| { let node_id = NodeId::new(node_id);