mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move new_animations_receiver from LayoutTaskData to LayoutTask.
This commit is contained in:
parent
604d1e8400
commit
5e4039d328
2 changed files with 12 additions and 8 deletions
|
@ -14,7 +14,7 @@ use script::layout_interface::Animation;
|
|||
use script_traits::ConstellationControlMsg;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::mpsc::{Sender, Receiver};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use style::animation::{GetMod, PropertyAnimation};
|
||||
use style::properties::ComputedValues;
|
||||
|
@ -50,9 +50,11 @@ pub fn start_transitions_if_applicable(new_animations_sender: &Mutex<Sender<Anim
|
|||
|
||||
/// Processes any new animations that were discovered after style recalculation.
|
||||
/// Also expire any old animations that have completed.
|
||||
pub fn update_animation_state(rw_data: &mut LayoutTaskData, pipeline_id: PipelineId) {
|
||||
pub fn update_animation_state(rw_data: &mut LayoutTaskData,
|
||||
new_animations_receiver: &Receiver<Animation>,
|
||||
pipeline_id: PipelineId) {
|
||||
let mut new_running_animations = Vec::new();
|
||||
while let Ok(animation) = rw_data.new_animations_receiver.try_recv() {
|
||||
while let Ok(animation) = new_animations_receiver.try_recv() {
|
||||
new_running_animations.push(animation)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue