From 79f31b66c331207d9c5e1d31c226e49e8acb776f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 7 Nov 2019 06:54:03 +0100 Subject: 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. --- wgpu/src/renderer.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'wgpu') 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); -- cgit