diff --git a/webrender/src/render_backend.rs b/webrender/src/render_backend.rs index 238399244f..2a60a14c40 100644 --- a/webrender/src/render_backend.rs +++ b/webrender/src/render_backend.rs @@ -309,7 +309,7 @@ impl RenderBackend { if let Some(ref wrapper) = self.webrender_context_handle { let dispatcher: Option> = if cfg!(target_os = "windows") { Some(Box::new(WebRenderGLDispatcher { - dispatcher: self.main_thread_dispatcher.clone() + dispatcher: Arc::clone(&self.main_thread_dispatcher) })) } else { None diff --git a/webrender/src/renderer.rs b/webrender/src/renderer.rs index ada776c124..899f0615da 100644 --- a/webrender/src/renderer.rs +++ b/webrender/src/renderer.rs @@ -589,7 +589,7 @@ impl Renderer { let file_watch_handler = FileWatcher { result_tx: result_tx.clone(), - notifier: notifier.clone(), + notifier: Arc::clone(¬ifier), }; let mut device = Device::new(gl, @@ -857,11 +857,11 @@ impl Renderer { device.end_frame(); let main_thread_dispatcher = Arc::new(Mutex::new(None)); - let backend_notifier = notifier.clone(); - let backend_main_thread_dispatcher = main_thread_dispatcher.clone(); + let backend_notifier = Arc::clone(¬ifier); + let backend_main_thread_dispatcher = Arc::clone(&main_thread_dispatcher); let vr_compositor = Arc::new(Mutex::new(None)); - let backend_vr_compositor = vr_compositor.clone(); + let backend_vr_compositor = Arc::clone(&vr_compositor); // We need a reference to the webrender context from the render backend in order to share // texture ids