Skip to content

Commit

Permalink
Favor Arc::clone function syntax instead of method syntax in render_b…
Browse files Browse the repository at this point in the history
…ackend.rs and renderer.rs.
  • Loading branch information
nical committed Mar 30, 2017
1 parent 9355112 commit da915a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion webrender/src/render_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl RenderBackend {
if let Some(ref wrapper) = self.webrender_context_handle {
let dispatcher: Option<Box<GLContextDispatcher>> = if cfg!(target_os = "windows") {
Some(Box::new(WebRenderGLDispatcher {
dispatcher: self.main_thread_dispatcher.clone()
dispatcher: Arc::clone(&self.main_thread_dispatcher)
}))
} else {
None
Expand Down
8 changes: 4 additions & 4 deletions webrender/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ impl Renderer {

let file_watch_handler = FileWatcher {
result_tx: result_tx.clone(),
notifier: notifier.clone(),
notifier: Arc::clone(&notifier),
};

let mut device = Device::new(gl,
Expand Down Expand Up @@ -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(&notifier);
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
Expand Down

0 comments on commit da915a5

Please sign in to comment.