Skip to content

Commit

Permalink
Process normal traversal for throttled animation flush as well.
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: BirD8BDMifp
  • Loading branch information
Hiroyuki Ikezoe authored and bholley committed Aug 12, 2017
1 parent faad7ff commit c0de5eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions components/style/traversal_flags.rs
Expand Up @@ -34,6 +34,10 @@ bitflags! {
/// Allows the traversal to run in parallel if there are sufficient cores on
/// the machine.
const ParallelTraversal = 1 << 7,
/// Flush throttled animations. By default, we only update throttled animations
/// when we have other non-throttled work to do. With this flag, we
/// unconditionally tick and process them.
const FlushThrottledAnimations = 1 << 8,

}
}
Expand Down Expand Up @@ -67,6 +71,7 @@ pub fn assert_traversal_flags_match() {
ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants =>
ClearAnimationOnlyDirtyDescendants,
ServoTraversalFlags_ParallelTraversal => ParallelTraversal,
ServoTraversalFlags_FlushThrottledAnimations => FlushThrottledAnimations,
}
}

Expand Down
7 changes: 0 additions & 7 deletions ports/geckolib/glue.rs
Expand Up @@ -278,13 +278,6 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
}
}

if traversal_flags.for_animation_only() {
debug!("Servo_TraverseSubtree complete (animation-only, aodd={})",
element.has_animation_only_dirty_descendants());
return element.has_animation_only_dirty_descendants() ||
element.borrow_data().unwrap().restyle.is_restyle();
}

traverse_subtree(element,
raw_data,
traversal_flags,
Expand Down

0 comments on commit c0de5eb

Please sign in to comment.