mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Merge in servo/master
This commit is contained in:
commit
19686acdec
78 changed files with 2000 additions and 989 deletions
|
@ -126,6 +126,9 @@ pub struct LayoutTask {
|
|||
//// The channel to send messages to ourself.
|
||||
pub chan: LayoutChan,
|
||||
|
||||
/// The channel on which messages can be sent to the constellation.
|
||||
pub constellation_chan: ConstellationChan,
|
||||
|
||||
/// The channel on which messages can be sent to the script task.
|
||||
pub script_chan: ScriptControlChan,
|
||||
|
||||
|
@ -274,6 +277,7 @@ impl LayoutTask {
|
|||
pipeline_port: pipeline_port,
|
||||
chan: chan,
|
||||
script_chan: script_chan,
|
||||
constellation_chan: constellation_chan.clone(),
|
||||
paint_chan: paint_chan,
|
||||
time_profiler_chan: time_profiler_chan,
|
||||
resource_task: resource_task,
|
||||
|
@ -414,7 +418,7 @@ impl LayoutTask {
|
|||
},
|
||||
Msg::ReapLayoutData(dead_layout_data) => {
|
||||
unsafe {
|
||||
LayoutTask::handle_reap_layout_data(dead_layout_data)
|
||||
self.handle_reap_layout_data(dead_layout_data)
|
||||
}
|
||||
},
|
||||
Msg::PrepareToExit(response_chan) => {
|
||||
|
@ -443,7 +447,7 @@ impl LayoutTask {
|
|||
match self.port.recv().unwrap() {
|
||||
Msg::ReapLayoutData(dead_layout_data) => {
|
||||
unsafe {
|
||||
LayoutTask::handle_reap_layout_data(dead_layout_data)
|
||||
self.handle_reap_layout_data(dead_layout_data)
|
||||
}
|
||||
}
|
||||
Msg::ExitNow(exit_type) => {
|
||||
|
@ -940,9 +944,9 @@ impl LayoutTask {
|
|||
|
||||
/// Handles a message to destroy layout data. Layout data must be destroyed on *this* task
|
||||
/// because the struct type is transmuted to a different type on the script side.
|
||||
unsafe fn handle_reap_layout_data(layout_data: LayoutData) {
|
||||
unsafe fn handle_reap_layout_data(&self, layout_data: LayoutData) {
|
||||
let layout_data_wrapper: LayoutDataWrapper = mem::transmute(layout_data);
|
||||
layout_data_wrapper.clear();
|
||||
layout_data_wrapper.remove_compositor_layers(self.constellation_chan.clone());
|
||||
}
|
||||
|
||||
/// Returns profiling information which is passed to the time profiler.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue