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

Unified Diff: cc/animation/layer_animation_controller.cc

Issue 441913002: Check animation notify values first while sending notification to Observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added variables back into PropertyUpdate Created 6 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/layer_animation_controller.cc
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index 0088c3dde8ed422451abc14a11f5059fa7df5a55..c42118839857c3fe8c4ae5d856c9da0a9ca7f2a2 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -924,7 +924,8 @@ void LayerAnimationController::NotifyObserversOpacityAnimated(
value_observers_);
LayerAnimationValueObserver* obs;
while ((obs = it.GetNext()) != NULL) {
- if ((notify_active_observers && obs->IsActive()) ||
+ if ((notify_active_observers && notify_pending_observers) ||
+ (notify_active_observers && obs->IsActive()) ||
(notify_pending_observers && !obs->IsActive()))
obs->OnOpacityAnimated(opacity);
}
@@ -940,7 +941,8 @@ void LayerAnimationController::NotifyObserversTransformAnimated(
value_observers_);
LayerAnimationValueObserver* obs;
while ((obs = it.GetNext()) != NULL) {
- if ((notify_active_observers && obs->IsActive()) ||
+ if ((notify_active_observers && notify_pending_observers) ||
+ (notify_active_observers && obs->IsActive()) ||
(notify_pending_observers && !obs->IsActive()))
obs->OnTransformAnimated(transform);
}
@@ -956,7 +958,8 @@ void LayerAnimationController::NotifyObserversFilterAnimated(
value_observers_);
LayerAnimationValueObserver* obs;
while ((obs = it.GetNext()) != NULL) {
- if ((notify_active_observers && obs->IsActive()) ||
+ if ((notify_active_observers && notify_pending_observers) ||
+ (notify_active_observers && obs->IsActive()) ||
(notify_pending_observers && !obs->IsActive()))
obs->OnFilterAnimated(filters);
}
@@ -972,7 +975,8 @@ void LayerAnimationController::NotifyObserversScrollOffsetAnimated(
value_observers_);
LayerAnimationValueObserver* obs;
while ((obs = it.GetNext()) != NULL) {
- if ((notify_active_observers && obs->IsActive()) ||
+ if ((notify_active_observers && notify_pending_observers) ||
+ (notify_active_observers && obs->IsActive()) ||
(notify_pending_observers && !obs->IsActive()))
obs->OnScrollOffsetAnimated(scroll_offset);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698