1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Remove more Arc<Mutex<...>> from font code

By making `Font` a view type and indexing by font ID, we can avoid
wrapping `FontImpl` and `TextureAtlas` in an `Arc<Mutex<...>>`.
This commit is contained in:
valadaptive
2025-07-04 00:03:57 -04:00
parent 02d45d70bc
commit 837fc7fef7
5 changed files with 208 additions and 156 deletions

View File

@@ -227,7 +227,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let galley = fonts.layout(LOREM_IPSUM_LONG.to_owned(), font_id, text_color, wrap_width);
let font_image_size = fonts.font_image_size();
let prepared_discs = fonts.texture_atlas().lock().prepared_discs();
let prepared_discs = fonts.texture_atlas().prepared_discs();
let mut tessellator = egui::epaint::Tessellator::new(
1.0,
Default::default(),