aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2015-11-06 15:10:08 +0100
committerMs2ger <Ms2ger@gmail.com>2015-11-09 09:03:59 +0100
commit5e4039d328744bdb7aae2d1c848961dbec2df0a0 (patch)
treef64d4606c12392daf2915d87d4efa1e81f169ff9 /components/layout/layout_task.rs
parent604d1e84002583e648258502b62172a04f78043d (diff)
downloadservo-5e4039d328744bdb7aae2d1c848961dbec2df0a0.tar.gz
servo-5e4039d328744bdb7aae2d1c848961dbec2df0a0.zip
Move new_animations_receiver from LayoutTaskData to LayoutTask.
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index e9e705fde85..637f2ff6f94 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -128,9 +128,6 @@ pub struct LayoutTaskData {
/// The list of currently-running animations.
pub running_animations: Arc<HashMap<OpaqueNode, Vec<Animation>>>,
- /// Receives newly-discovered animations.
- pub new_animations_receiver: Receiver<Animation>,
-
/// A counter for epoch messages
epoch: Epoch,
@@ -222,6 +219,9 @@ pub struct LayoutTask {
/// sent.
new_animations_sender: Sender<Animation>,
+ /// Receives newly-discovered animations.
+ new_animations_receiver: Receiver<Animation>,
+
/// A mutex to allow for fast, read-only RPC of layout's internal data
/// structures, while still letting the LayoutTask modify them.
///
@@ -434,6 +434,7 @@ impl LayoutTask {
parallel_traversal: parallel_traversal,
generation: 0,
new_animations_sender: new_animations_sender,
+ new_animations_receiver: new_animations_receiver,
rw_data: Arc::new(Mutex::new(
LayoutTaskData {
root_flow: None,
@@ -448,7 +449,6 @@ impl LayoutTask {
running_animations: Arc::new(HashMap::new()),
offset_parent_response: OffsetParentResponse::empty(),
visible_rects: Arc::new(HashMap::with_hash_state(Default::default())),
- new_animations_receiver: new_animations_receiver,
epoch: Epoch(0),
outstanding_web_fonts: outstanding_web_fonts_counter,
})),
@@ -1340,7 +1340,9 @@ impl LayoutTask {
layout_context: &mut SharedLayoutContext) {
if let Some(mut root_flow) = rw_data.layout_root() {
// Kick off animations if any were triggered, expire completed ones.
- animation::update_animation_state(&mut *rw_data, self.id);
+ animation::update_animation_state(&mut *rw_data,
+ &self.new_animations_receiver,
+ self.id);
profile(time::ProfilerCategory::LayoutRestyleDamagePropagation,
self.profiler_metadata(),