mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
compositing: Remove CompositorThread struct
This commit is contained in:
parent
530b5a649e
commit
9c8d5d58d8
3 changed files with 4 additions and 17 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue