mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Move new_animations_sender from LayoutTaskData to LayoutTask.
This commit is contained in:
parent
bdfa5fe804
commit
604d1e8400
1 changed files with 6 additions and 6 deletions
|
@ -131,10 +131,6 @@ pub struct LayoutTaskData {
|
||||||
/// Receives newly-discovered animations.
|
/// Receives newly-discovered animations.
|
||||||
pub new_animations_receiver: Receiver<Animation>,
|
pub new_animations_receiver: Receiver<Animation>,
|
||||||
|
|
||||||
/// A channel on which new animations that have been triggered by style recalculation can be
|
|
||||||
/// sent.
|
|
||||||
pub new_animations_sender: Sender<Animation>,
|
|
||||||
|
|
||||||
/// A counter for epoch messages
|
/// A counter for epoch messages
|
||||||
epoch: Epoch,
|
epoch: Epoch,
|
||||||
|
|
||||||
|
@ -222,6 +218,10 @@ pub struct LayoutTask {
|
||||||
/// This can be used to easily check for invalid stale data.
|
/// This can be used to easily check for invalid stale data.
|
||||||
generation: u32,
|
generation: u32,
|
||||||
|
|
||||||
|
/// A channel on which new animations that have been triggered by style recalculation can be
|
||||||
|
/// sent.
|
||||||
|
new_animations_sender: Sender<Animation>,
|
||||||
|
|
||||||
/// A mutex to allow for fast, read-only RPC of layout's internal data
|
/// A mutex to allow for fast, read-only RPC of layout's internal data
|
||||||
/// structures, while still letting the LayoutTask modify them.
|
/// structures, while still letting the LayoutTask modify them.
|
||||||
///
|
///
|
||||||
|
@ -433,6 +433,7 @@ impl LayoutTask {
|
||||||
canvas_layers_sender: canvas_layers_sender,
|
canvas_layers_sender: canvas_layers_sender,
|
||||||
parallel_traversal: parallel_traversal,
|
parallel_traversal: parallel_traversal,
|
||||||
generation: 0,
|
generation: 0,
|
||||||
|
new_animations_sender: new_animations_sender,
|
||||||
rw_data: Arc::new(Mutex::new(
|
rw_data: Arc::new(Mutex::new(
|
||||||
LayoutTaskData {
|
LayoutTaskData {
|
||||||
root_flow: None,
|
root_flow: None,
|
||||||
|
@ -448,7 +449,6 @@ impl LayoutTask {
|
||||||
offset_parent_response: OffsetParentResponse::empty(),
|
offset_parent_response: OffsetParentResponse::empty(),
|
||||||
visible_rects: Arc::new(HashMap::with_hash_state(Default::default())),
|
visible_rects: Arc::new(HashMap::with_hash_state(Default::default())),
|
||||||
new_animations_receiver: new_animations_receiver,
|
new_animations_receiver: new_animations_receiver,
|
||||||
new_animations_sender: new_animations_sender,
|
|
||||||
epoch: Epoch(0),
|
epoch: Epoch(0),
|
||||||
outstanding_web_fonts: outstanding_web_fonts_counter,
|
outstanding_web_fonts: outstanding_web_fonts_counter,
|
||||||
})),
|
})),
|
||||||
|
@ -486,7 +486,7 @@ impl LayoutTask {
|
||||||
url: (*url).clone(),
|
url: (*url).clone(),
|
||||||
visible_rects: rw_data.visible_rects.clone(),
|
visible_rects: rw_data.visible_rects.clone(),
|
||||||
generation: self.generation,
|
generation: self.generation,
|
||||||
new_animations_sender: Mutex::new(rw_data.new_animations_sender.clone()),
|
new_animations_sender: Mutex::new(self.new_animations_sender.clone()),
|
||||||
goal: goal,
|
goal: goal,
|
||||||
running_animations: rw_data.running_animations.clone(),
|
running_animations: rw_data.running_animations.clone(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue