From 2d2c88a704455f5dc3e14b557bd52eefcec14d2e Mon Sep 17 00:00:00 2001 From: Micha White Date: Sun, 18 Sep 2022 21:18:23 -0400 Subject: Some optimization --- src/config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index e9f9ca4..c29a957 100644 --- a/src/config.rs +++ b/src/config.rs @@ -69,7 +69,7 @@ pub struct RenderWindowConfig<'a> { /// The initial capacity of the instance buffer. The size will increase if /// it's not large enough. Increasing this value may improve performance /// towards the beginning, if a lot of instances are being created. - pub instance_capacity: usize + pub instance_capacity: usize, } impl<'a> Default for RenderWindowConfig<'a> { @@ -87,11 +87,13 @@ impl<'a> Default for RenderWindowConfig<'a> { } impl<'a> RenderWindowConfig<'a> { - /// Create a `WindowBuilder` from the configuration given + /// Create a `WindowBuilder` from the configuration given. This window is + /// initially invisible and must later be made visible. pub(crate) fn to_window(&self) -> WindowBuilder { // start building the window let mut builder = WindowBuilder::new() .with_title(self.title.as_ref()) + .with_visible(false) .with_inner_size(LogicalSize::new( self.default_width.get(), self.default_height.get(), -- cgit v1.2.3