diff options
author | 2021-07-22 18:21:50 +0700 | |
---|---|---|
committer | 2021-07-22 18:21:50 +0700 | |
commit | 217f5be8272f48a5b043d066ed1788cc127e1164 (patch) | |
tree | ef09f2324d8d44d52938d34d8d007ff1bf681721 /wgpu/src/text.rs | |
parent | 6469e463cd1f99190c6eba4701d4c1059934d3ee (diff) | |
download | iced-217f5be8272f48a5b043d066ed1788cc127e1164.tar.gz iced-217f5be8272f48a5b043d066ed1788cc127e1164.tar.bz2 iced-217f5be8272f48a5b043d066ed1788cc127e1164.zip |
Add `text_multithreading` to `Settings` in `iced_glow` and `iced_wgpu`
Diffstat (limited to 'wgpu/src/text.rs')
-rw-r--r-- | wgpu/src/text.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index eed5de38..2b5b94c9 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -15,6 +15,7 @@ impl Pipeline { device: &wgpu::Device, format: wgpu::TextureFormat, default_font: Option<&[u8]>, + multithreading: bool, ) -> Self { let default_font = default_font.map(|slice| slice.to_vec()); @@ -46,9 +47,7 @@ impl Pipeline { let draw_brush = wgpu_glyph::GlyphBrushBuilder::using_font(font.clone()) .initial_cache_size((2048, 2048)) - .draw_cache_multithread(cfg!( - feature = "glyph_draw_cache_multithread" - )) + .draw_cache_multithread(multithreading) .build(device, format); let measure_brush = |