Merge branch 'trunk' into add_lifetime_to_text

This commit is contained in:
Lucas 2021-02-09 21:17:44 -05:00 committed by GitHub
commit 0bb92f7952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 9 deletions

View file

@ -167,8 +167,11 @@ fn run_event_loop(file_path_opt: Option<&Path>) -> Result<(), Box<dyn Error>> {
let mut keyboard_modifiers = ModifiersState::empty();
// This arena is never cleared and should only be used for allocations that occur rarely
let arena = Bump::new();
let mut rects_arena = Bump::new();
// Render loop
window.request_redraw();
@ -317,9 +320,11 @@ fn run_event_loop(file_path_opt: Option<&Path>) -> Result<(), Box<dyn Error>> {
);
}
rects_arena.reset();
match draw_all_rects(
&app_model.ed_model_opt,
&arena,
&rects_arena,
&mut encoder,
&frame.view,
&gpu_device,