diff options
author | 2019-11-07 06:54:03 +0100 | |
---|---|---|
committer | 2019-11-07 06:59:27 +0100 | |
commit | 79f31b66c331207d9c5e1d31c226e49e8acb776f (patch) | |
tree | 21cd68e62fd1381c84653f19593e40877e3b207d /wgpu | |
parent | 5fd0c724b26c97e2df66c01b3924e31b141fa0f3 (diff) | |
download | iced-79f31b66c331207d9c5e1d31c226e49e8acb776f.tar.gz iced-79f31b66c331207d9c5e1d31c226e49e8acb776f.tar.bz2 iced-79f31b66c331207d9c5e1d31c226e49e8acb776f.zip |
Increase initial size of text cache in `iced_wgpu`
This reduces the amount of cache updates in general when text changes.
The new cache should take 4MB of VRAM. I think this is reasonable for a
modern GUI toolkit. In any case, we should be able to reduce this value in the
future.
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/renderer.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index a7628bf4..f25e2855 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -74,6 +74,7 @@ impl Renderer { let glyph_brush = GlyphBrushBuilder::using_fonts_bytes(vec![default_font, mono_font]) + .initial_cache_size((2048, 2048)) .build(&mut device, TextureFormat::Bgra8UnormSrgb); let quad_pipeline = quad::Pipeline::new(&mut device); |