diff options
author | 2021-07-22 18:39:37 +0700 | |
---|---|---|
committer | 2021-07-22 18:39:37 +0700 | |
commit | a2b1ba522a8b90a2e539fff5936c798efc3f3807 (patch) | |
tree | 13bbbfb3ee9255e2e4ec9903ae893fbeda6b087f /wgpu/src/text.rs | |
parent | 82488de3ab2be3ad0b556ae5ccb754a989132dca (diff) | |
parent | 357a8a95c9820651110fe4d80d8d33a2678827c0 (diff) | |
download | iced-a2b1ba522a8b90a2e539fff5936c798efc3f3807.tar.gz iced-a2b1ba522a8b90a2e539fff5936c798efc3f3807.tar.bz2 iced-a2b1ba522a8b90a2e539fff5936c798efc3f3807.zip |
Merge pull request #914 from yusdacra/feat/expose_draw_cache_multithread
feat: expose draw_cache_multithread as a feature
Diffstat (limited to 'wgpu/src/text.rs')
-rw-r--r-- | wgpu/src/text.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index 4d92d9e9..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,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 = |