Remove dependency of constellation on canvas

move `ConstellationCanvasMsg` to canvas_traits and start canvas paint thread
to components/servo. This, however, does not remove dependency for conditional
compilation options.
This commit is contained in:
Kunal Mohan 2020-02-05 23:25:52 +05:30
parent 5f55cd5d71
commit a4ba33376a
No known key found for this signature in database
GPG key ID: 2B475A4524237BAC
8 changed files with 25 additions and 25 deletions

View file

@ -10,15 +10,10 @@ publish = false
name = "constellation"
path = "lib.rs"
[features]
canvas2d-azure = ["canvas/canvas2d-azure"]
canvas2d-raqote = ["canvas/canvas2d-raqote"]
[dependencies]
background_hang_monitor = { path = "../background_hang_monitor"}
backtrace = "0.3"
bluetooth_traits = { path = "../bluetooth_traits" }
canvas = {path = "../canvas", default-features = false}
canvas_traits = {path = "../canvas_traits"}
compositing = {path = "../compositing"}
crossbeam-channel = "0.3"

View file

@ -103,10 +103,9 @@ use crate::timer_scheduler::TimerScheduler;
use background_hang_monitor::HangMonitorRegister;
use backtrace::Backtrace;
use bluetooth_traits::BluetoothRequest;
use canvas::canvas_paint_thread::CanvasPaintThread;
use canvas::ConstellationCanvasMsg;
use canvas_traits::canvas::{CanvasId, CanvasMsg};
use canvas_traits::webgl::WebGLThreads;
use canvas_traits::ConstellationCanvasMsg;
use compositing::compositor_thread::CompositorProxy;
use compositing::compositor_thread::Msg as ToCompositorMsg;
use compositing::{ConstellationMsg as FromCompositorMsg, SendableFrameTree};
@ -811,6 +810,8 @@ where
is_running_problem_test: bool,
hard_fail: bool,
enable_canvas_antialiasing: bool,
canvas_chan: Sender<ConstellationCanvasMsg>,
ipc_canvas_chan: IpcSender<CanvasMsg>,
) -> (Sender<FromCompositorMsg>, IpcSender<SWManagerMsg>) {
let (compositor_sender, compositor_receiver) = unbounded();
@ -901,8 +902,6 @@ where
}),
);
let (canvas_chan, ipc_canvas_chan) = CanvasPaintThread::start();
let mut constellation: Constellation<Message, LTF, STF> = Constellation {
namespace_receiver,
namespace_sender,