From 860a6923bbed57a21ce4b2cae331f6a3a51ca3fe Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 11 Nov 2019 06:07:31 +0100 Subject: Split text measurements cache from rendering cache This speeds up layouting in the most common scenario considerably! :tada: --- winit/src/application.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winit/src/application.rs') diff --git a/winit/src/application.rs b/winit/src/application.rs index fdd659d9..331bafa0 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -61,7 +61,7 @@ pub trait Application { let user_interface = UserInterface::build( document(&mut self, size, &mut debug), Cache::default(), - &renderer, + &mut renderer, ); debug.layout_finished(); @@ -87,7 +87,7 @@ pub trait Application { let mut user_interface = UserInterface::build( document(&mut self, size, &mut debug), cache.take().unwrap(), - &renderer, + &mut renderer, ); debug.layout_finished(); @@ -130,7 +130,7 @@ pub trait Application { let user_interface = UserInterface::build( document(&mut self, size, &mut debug), temp_cache, - &renderer, + &mut renderer, ); debug.layout_finished(); -- cgit