mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
arena heads-up comment, mem_arena -> arena, used seperate arena for GUI rects
This commit is contained in:
parent
581ef916fc
commit
cd8adb1d6d
5 changed files with 14 additions and 9 deletions
|
@ -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();
|
||||
|
||||
|
@ -313,9 +316,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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue