diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-04 05:50:50 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-04 05:50:50 +0530 |
commit | aba500a698584e66975cd93006ca8cf745370f7d (patch) | |
tree | 0a66788ca9ec0c756f3a4b82639880a7ff4db1af /components/layout/layout_thread.rs | |
parent | 37bcc161fe45bf8c1cb1172b8e0d12c7d03371b6 (diff) | |
parent | 92061132f369409380c80046adb475941d805921 (diff) | |
download | servo-aba500a698584e66975cd93006ca8cf745370f7d.tar.gz servo-aba500a698584e66975cd93006ca8cf745370f7d.zip |
Auto merge of #9858 - glennw:anim-smoothness, r=pcwalton
Fix animation smoothness when using requestAnimationFrame.
Previously, the flow for ticking animations was:
Compositor -> Constellation -> Layout -> Script
However, this means that the compositor <-> layout messages can thrash, meaning layout thread is very rarely idle.
This means that the script thread (which joins on the layout thread during reflow) was unable to execute and run rAF callbacks.
With this change, the flow is now:
Compositor -> Constellation -> Script (when rAF is active).
Compositor -> Constellation -> Layout (when transitions / animations are active and no rAF is present).
This makes rAF based animation *much* smoother.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9858)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r-- | components/layout/layout_thread.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index 1a8bdfb4a19..f152fe6c695 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -1220,10 +1220,6 @@ impl LayoutThread { fn tick_all_animations<'a, 'b>(&mut self, possibly_locked_rw_data: &mut RwData<'a, 'b>) { let mut rw_data = possibly_locked_rw_data.lock(); self.tick_animations(&mut rw_data); - - self.script_chan - .send(ConstellationControlMsg::TickAllAnimations(self.id)) - .unwrap(); } pub fn tick_animations(&mut self, rw_data: &mut LayoutThreadData) { |