Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(987)

Unified Diff: cc/animation/element_animations.cc

Issue 2527623002: add has_element_in_any_list check in ElementAnimations::UpdateActivation (Closed)
Patch Set: Deactivate ElementAnimations from AnimationHost if no element in any list Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/animation/element_animations.cc
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index f8a7e9e9bef15e53dfa6504c74bc2f24867d0169..f178d6c7237dee2e13c8e790c937178202e47b7d 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -159,8 +159,10 @@ void ElementAnimations::PushPropertiesTo(
void ElementAnimations::Animate(base::TimeTicks monotonic_time) {
DCHECK(!monotonic_time.is_null());
- if (!has_element_in_active_list() && !has_element_in_pending_list())
+ if (!has_element_in_active_list() && !has_element_in_pending_list()) {
+ animation_host_->DidDeactivateElementAnimations(this);
loyso (OOO) 2016/11/27 23:36:55 if you call host_->UnregisterElement, ElementAnima
junchao.han 2016/11/28 04:09:03 Thanks for the comments. Not DidActivateElementAni
return;
+ }
for (auto& player : players_list_) {
if (player.needs_to_start_animations())
« no previous file with comments | « no previous file | cc/animation/element_animations_unittest.cc » ('j') | cc/animation/element_animations_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698