diff options
author | Andrew Shu <talklittle@gmail.com> | 2016-06-02 20:02:14 -0700 |
---|---|---|
committer | Andrew Shu <talklittle@gmail.com> | 2016-06-02 22:36:45 -0700 |
commit | 9c8d5d58d81d6315a30df923e24e42abe47ca95e (patch) | |
tree | 4b380ce7b10cfd221e4b20f279e492e179b72e83 | |
parent | 530b5a649eb7284c0ff4e316b8eabd5cc62c1e80 (diff) | |
download | servo-9c8d5d58d81d6315a30df923e24e42abe47ca95e.tar.gz servo-9c8d5d58d81d6315a30df923e24e42abe47ca95e.zip |
compositing: Remove CompositorThread struct
-rw-r--r-- | components/compositing/compositor_thread.rs | 15 | ||||
-rw-r--r-- | components/compositing/lib.rs | 2 | ||||
-rw-r--r-- | components/servo/lib.rs | 4 |
3 files changed, 4 insertions, 17 deletions
diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index a51b11706ff..910e6817d76 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -5,7 +5,7 @@ //! Communication with the compositor thread. use SendableFrameTree; -use compositor::{CompositingReason, IOCompositor}; +use compositor::CompositingReason; use euclid::point::Point2D; use euclid::size::Size2D; use gfx_traits::{Epoch, FrameTreeId, LayerId, LayerProperties, PaintListener}; @@ -17,14 +17,12 @@ use profile_traits::mem; use profile_traits::time; use script_traits::{AnimationState, ConstellationMsg, EventResult}; use std::fmt::{Debug, Error, Formatter}; -use std::rc::Rc; use std::sync::mpsc::{Receiver, Sender, channel}; use style_traits::cursor::Cursor; use style_traits::viewport::ViewportConstraints; use url::Url; use webrender; use webrender_traits; -use windowing::WindowMethods; /// Sends messages to the compositor. This is a trait supplied by the port because the method used /// to communicate with the compositor may have to kick OS event loops awake, communicate cross- @@ -231,17 +229,6 @@ impl Debug for Msg { } } -pub struct CompositorThread; - -impl CompositorThread { - pub fn create<Window>(window: Rc<Window>, - state: InitialCompositorState) - -> IOCompositor<Window> - where Window: WindowMethods + 'static { - IOCompositor::create(window, state) - } -} - /// Data used to construct a compositor. pub struct InitialCompositorState { /// A channel to the compositor. diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs index d18f9b28caa..a1e1b1f21e9 100644 --- a/components/compositing/lib.rs +++ b/components/compositing/lib.rs @@ -36,7 +36,7 @@ extern crate util; extern crate webrender; extern crate webrender_traits; -pub use compositor_thread::{CompositorProxy, CompositorThread}; +pub use compositor_thread::CompositorProxy; pub use compositor::IOCompositor; use euclid::size::TypedSize2D; use gfx::paint_thread::ChromeToPaintMsg; diff --git a/components/servo/lib.rs b/components/servo/lib.rs index bb86a01080e..363cd3bec4f 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -60,7 +60,7 @@ fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { } use compositing::compositor_thread::InitialCompositorState; use compositing::windowing::WindowEvent; use compositing::windowing::WindowMethods; -use compositing::{CompositorProxy, CompositorThread, IOCompositor}; +use compositing::{CompositorProxy, IOCompositor}; #[cfg(not(target_os = "windows"))] use constellation::content_process_sandbox_profile; use constellation::{Constellation, InitialConstellationState, UnprivilegedPipelineContent}; @@ -167,7 +167,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static { // The compositor coordinates with the client window to create the final // rendered page and display it somewhere. - let compositor = CompositorThread::create(window, InitialCompositorState { + let compositor = IOCompositor::create(window, InitialCompositorState { sender: compositor_proxy, receiver: compositor_receiver, constellation_chan: constellation_chan, |