style: Rewrite the animation representation to allow having state in layout

I have to make the appropriate changes in layout, but I'm running out of battery
in the bus.
This commit is contained in:
Emilio Cobos Álvarez 2016-06-19 19:39:32 +02:00
parent 5b27e46d04
commit c16c5acade
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 258 additions and 152 deletions

View file

@ -1302,13 +1302,13 @@ impl LayoutThread {
if let Some(mut root_flow) = self.root_flow.clone() {
// Perform an abbreviated style recalc that operates without access to the DOM.
let animations = self.running_animations.read().unwrap();
let mut animations = self.running_animations.write().unwrap();
profile(time::ProfilerCategory::LayoutStyleRecalc,
self.profiler_metadata(),
self.time_profiler_chan.clone(),
|| {
animation::recalc_style_for_animations(flow_ref::deref_mut(&mut root_flow),
&*animations)
&mut animations)
});
}