diff options
author | 2021-07-22 12:37:39 -0500 | |
---|---|---|
committer | 2021-07-22 12:37:39 -0500 | |
commit | e822f654e44d2d7375b7fda966bb772055f377d4 (patch) | |
tree | 8707561f1bb09c9e58cc9d9884bfb16d956f9f65 /wgpu/src/text.rs | |
parent | 1c06920158e1a47977b2762bf8b34e56fd1a935a (diff) | |
parent | dc0b96ce407283f2ffd9add5ad339f89097555d3 (diff) | |
download | iced-e822f654e44d2d7375b7fda966bb772055f377d4.tar.gz iced-e822f654e44d2d7375b7fda966bb772055f377d4.tar.bz2 iced-e822f654e44d2d7375b7fda966bb772055f377d4.zip |
Merge branch 'master' of https://github.com/hecrj/iced into wgpu_outdatedframe
Diffstat (limited to 'wgpu/src/text.rs')
-rw-r--r-- | wgpu/src/text.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index 78999cf8..2b5b94c9 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -15,10 +15,12 @@ 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()); // TODO: Font customization + #[cfg(not(target_os = "ios"))] #[cfg(feature = "default_system_font")] let default_font = { default_font.or_else(|| { @@ -45,7 +47,7 @@ impl Pipeline { let draw_brush = wgpu_glyph::GlyphBrushBuilder::using_font(font.clone()) .initial_cache_size((2048, 2048)) - .draw_cache_multithread(false) // TODO: Expose as a configuration flag + .draw_cache_multithread(multithreading) .build(device, format); let measure_brush = |