mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -105,7 +105,7 @@ pub struct Window {
|
|||
navigator: MutNullableHeap<JS<Navigator>>,
|
||||
image_cache_task: ImageCacheTask,
|
||||
image_cache_chan: ImageCacheChan,
|
||||
compositor: DOMRefCell<Box<ScriptListener+'static>>,
|
||||
compositor: DOMRefCell<ScriptListener>,
|
||||
browser_context: DOMRefCell<Option<BrowserContext>>,
|
||||
page: Rc<Page>,
|
||||
performance: MutNullableHeap<JS<Performance>>,
|
||||
|
@ -241,7 +241,7 @@ impl Window {
|
|||
&self.image_cache_task
|
||||
}
|
||||
|
||||
pub fn compositor<'a>(&'a self) -> RefMut<'a, Box<ScriptListener+'static>> {
|
||||
pub fn compositor<'a>(&'a self) -> RefMut<'a, ScriptListener> {
|
||||
self.compositor.borrow_mut()
|
||||
}
|
||||
|
||||
|
@ -964,7 +964,7 @@ impl Window {
|
|||
script_chan: Box<ScriptChan+Send>,
|
||||
image_cache_chan: ImageCacheChan,
|
||||
control_chan: ScriptControlChan,
|
||||
compositor: Box<ScriptListener+'static>,
|
||||
compositor: ScriptListener,
|
||||
image_cache_task: ImageCacheTask,
|
||||
resource_task: ResourceTask,
|
||||
storage_task: StorageTask,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue