mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
compositing: Move messages that go over the ScriptListener
to go over
an IPC channel instead. Because this used a boxed trait object to invoke messages across a process boundary, and boxed trait objects are not supported across IPC, we spawn a helper thread inside the compositor to perform the marshaling for us.
This commit is contained in:
parent
2947d78e4e
commit
e841065351
14 changed files with 211 additions and 82 deletions
|
@ -150,22 +150,21 @@ pub struct ScriptControlChan(pub Sender<ConstellationControlMsg>);
|
|||
/// crate.
|
||||
pub trait ScriptTaskFactory {
|
||||
/// Create a `ScriptTask`.
|
||||
fn create<C>(_phantom: Option<&mut Self>,
|
||||
id: PipelineId,
|
||||
parent_info: Option<(PipelineId, SubpageId)>,
|
||||
compositor: C,
|
||||
layout_chan: &OpaqueScriptLayoutChannel,
|
||||
control_chan: ScriptControlChan,
|
||||
control_port: Receiver<ConstellationControlMsg>,
|
||||
constellation_msg: ConstellationChan,
|
||||
failure_msg: Failure,
|
||||
resource_task: ResourceTask,
|
||||
storage_task: StorageTask,
|
||||
image_cache_task: ImageCacheTask,
|
||||
devtools_chan: Option<DevtoolsControlChan>,
|
||||
window_size: Option<WindowSizeData>,
|
||||
load_data: LoadData)
|
||||
where C: ScriptListener + Send;
|
||||
fn create(_phantom: Option<&mut Self>,
|
||||
id: PipelineId,
|
||||
parent_info: Option<(PipelineId, SubpageId)>,
|
||||
compositor: ScriptListener,
|
||||
layout_chan: &OpaqueScriptLayoutChannel,
|
||||
control_chan: ScriptControlChan,
|
||||
control_port: Receiver<ConstellationControlMsg>,
|
||||
constellation_msg: ConstellationChan,
|
||||
failure_msg: Failure,
|
||||
resource_task: ResourceTask,
|
||||
storage_task: StorageTask,
|
||||
image_cache_task: ImageCacheTask,
|
||||
devtools_chan: Option<DevtoolsControlChan>,
|
||||
window_size: Option<WindowSizeData>,
|
||||
load_data: LoadData);
|
||||
/// Create a script -> layout channel (`Sender`, `Receiver` pair).
|
||||
fn create_layout_channel(_phantom: Option<&mut Self>) -> OpaqueScriptLayoutChannel;
|
||||
/// Clone the `Sender` in `pair`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue