Skip to content

Commit

Permalink
Avoid cloning graphics_calls
Browse files Browse the repository at this point in the history
  • Loading branch information
superlou committed Jul 28, 2023
1 parent e97162b commit 479d532
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/window_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ impl WindowHandler<String> for SignWindowHandler {
self.last_frame_time = Instant::now();

// Wait for graphics_calls access when the JsEnv thread finishes
let graphics_calls = self.graphics_calls.read().unwrap().clone();
//let graphics_calls = self.graphics_calls.read().unwrap().clone();
let graphics_calls = std::mem::take(&mut *self.graphics_calls.write().unwrap());
self.js_thread_tx.send(JsThreadMsg::RunFrame(dt)).unwrap();

self.draw_perf.start();
Expand Down

0 comments on commit 479d532

Please sign in to comment.