From ee478cb6d7206632db98e546e171a20a77fc2497 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Thu, 7 May 2020 19:45:20 +0000 Subject: [PATCH] Bug 1612440 - Renamed clone_sender into create_sender. r=gw This was split off from https://phabricator.services.mozilla.com/D71992 Depends on D74293 Differential Revision: https://phabricator.services.mozilla.com/D74296 --- gfx/webrender_bindings/src/bindings.rs | 4 ++-- gfx/wr/webrender_api/src/api.rs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs index 936824dc401c..61fb853a63aa 100644 --- a/gfx/webrender_bindings/src/bindings.rs +++ b/gfx/webrender_bindings/src/bindings.rs @@ -1481,7 +1481,7 @@ pub extern "C" fn wr_api_create_document( root_dh.ensure_hit_tester(); *out_handle = Box::into_raw(Box::new(DocumentHandle::new( - root_dh.api.clone_sender().create_api_by_client(next_namespace_id()), + root_dh.api.create_sender().create_api_by_client(next_namespace_id()), root_dh.hit_tester.clone(), doc_size, layer, @@ -1501,7 +1501,7 @@ pub extern "C" fn wr_api_clone(dh: &mut DocumentHandle, out_handle: &mut *mut Do dh.ensure_hit_tester(); let handle = DocumentHandle { - api: dh.api.clone_sender().create_api_by_client(next_namespace_id()), + api: dh.api.create_sender().create_api_by_client(next_namespace_id()), document_id: dh.document_id, hit_tester: dh.hit_tester.clone(), hit_tester_request: None, diff --git a/gfx/wr/webrender_api/src/api.rs b/gfx/wr/webrender_api/src/api.rs index 77870ebde412..8bb7aa3a6db1 100644 --- a/gfx/wr/webrender_api/src/api.rs +++ b/gfx/wr/webrender_api/src/api.rs @@ -1283,7 +1283,6 @@ pub enum ScrollClamping { /// /// This object is created along with the `Renderer` and it's main use from a /// user perspective is to create one or several `RenderApi` objects. -#[derive(Clone)] pub struct RenderApiSender { api_sender: Sender, @@ -1433,8 +1432,10 @@ impl RenderApi { } /// - pub fn clone_sender(&self) -> RenderApiSender { - RenderApiSender::new(self.api_sender.clone()) + pub fn create_sender(&self) -> RenderApiSender { + RenderApiSender::new( + self.api_sender.clone(), + ) } /// Add a document to the WebRender instance.