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

compositing: Remove CompositorThread struct #11569

Merged
merged 1 commit into from Jun 3, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.