mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script: Split Pipeline::create
into chrome process and content
process parts. This will make it easier to adapt to IPC. The trickiest part here was to make script tasks spawn new layout tasks directly instead of having the pipeline do it for them. The latter approach will not work in multiprocess mode, because layout and script must run in the same address space and the pipeline cannot inject tasks into another process.
This commit is contained in:
parent
64751b8eef
commit
e5b1ec4078
12 changed files with 316 additions and 149 deletions
|
@ -21,29 +21,17 @@ extern crate util;
|
|||
// The traits are here instead of in layout so
|
||||
// that these modules won't have to depend on layout.
|
||||
|
||||
use euclid::rect::Rect;
|
||||
use gfx::font_cache_task::FontCacheTask;
|
||||
use gfx::paint_task::PaintChan;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use msg::compositor_msg::{Epoch, LayerId};
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId, PipelineExitType};
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
|
||||
use profile_traits::mem;
|
||||
use profile_traits::time;
|
||||
use net_traits::image_cache_task::ImageCacheTask;
|
||||
use script_traits::{ScriptControlChan, OpaqueScriptLayoutChannel};
|
||||
use script_traits::{LayoutControlMsg, ScriptControlChan, OpaqueScriptLayoutChannel};
|
||||
use std::sync::mpsc::Sender;
|
||||
use util::geometry::Au;
|
||||
use url::Url;
|
||||
|
||||
/// Messages sent to the layout task from the constellation and/or compositor.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum LayoutControlMsg {
|
||||
ExitNow(PipelineExitType),
|
||||
GetCurrentEpoch(IpcSender<Epoch>),
|
||||
TickAnimations,
|
||||
SetVisibleRects(Vec<(LayerId, Rect<Au>)>),
|
||||
}
|
||||
|
||||
/// A channel wrapper for constellation messages
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
pub struct LayoutControlChan(pub IpcSender<LayoutControlMsg>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue