Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove compositor forwarding code and use dedicated mechanism #17269

Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

implement clone for embedder and compositor proxies

  • Loading branch information
gterzian committed Aug 28, 2017
commit 6bca3402a61d5a06103909b35e358e6ec745b522
@@ -27,7 +27,7 @@ impl GLContextFactory {
if cfg!(target_os = "windows") {
// Used to dispatch functions from the GLContext thread to the main thread's event loop.
// Required to allow WGL GLContext sharing in Windows.
GLContextFactory::Native(handle, Some(MainThreadDispatcher::new(proxy.clone_compositor_proxy())))
GLContextFactory::Native(handle, Some(MainThreadDispatcher::new(proxy.clone())))
} else {
GLContextFactory::Native(handle, None)
}
@@ -43,7 +43,10 @@ impl EmbedderProxy {
}
self.event_loop_waker.wake();
}
pub fn clone_embedder_proxy(&self) -> EmbedderProxy {
}

impl Clone for EmbedderProxy {
fn clone(&self) -> EmbedderProxy {
EmbedderProxy {
sender: self.sender.clone(),
event_loop_waker: self.event_loop_waker.clone(),
@@ -79,7 +82,10 @@ impl CompositorProxy {
}
self.event_loop_waker.wake();
}
pub fn clone_compositor_proxy(&self) -> CompositorProxy {
}

impl Clone for CompositorProxy {
fn clone(&self) -> CompositorProxy {
CompositorProxy {
sender: self.sender.clone(),
event_loop_waker: self.event_loop_waker.clone(),
@@ -699,7 +699,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
},
layout_to_constellation_chan: self.layout_sender.clone(),
scheduler_chan: self.scheduler_chan.clone(),
compositor_proxy: self.compositor_proxy.clone_compositor_proxy(),
compositor_proxy: self.compositor_proxy.clone(),
devtools_chan: self.devtools_chan.clone(),
bluetooth_thread: self.bluetooth_thread.clone(),
swmanager_thread: self.swmanager_sender.clone(),
@@ -1694,7 +1694,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
Some((parent_pipeline_id, frame_type)),
script_sender,
layout_sender,
self.compositor_proxy.clone_compositor_proxy(),
self.compositor_proxy.clone(),
is_private || parent_pipeline.is_private,
url.clone(),
parent_pipeline.visible)
@@ -1998,7 +1998,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
},
None => {
let event = EmbedderMsg::KeyEvent(None, ch, key, state, mods);
self.embedder_proxy.clone_embedder_proxy().send(event);
self.embedder_proxy.clone().send(event);
}
}
}
@@ -213,8 +213,8 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
// as the navigation context.
let (constellation_chan, sw_senders) = create_constellation(opts.user_agent.clone(),
opts.config_dir.clone(),
embedder_proxy.clone_embedder_proxy(),
compositor_proxy.clone_compositor_proxy(),
embedder_proxy.clone(),
compositor_proxy.clone(),
time_profiler_chan.clone(),
mem_profiler_chan.clone(),
debugger_chan,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.