Chromium Code Reviews| 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..84e6ce801f007187a3aad837361ca8cba3485077 100644 |
| --- a/cc/animation/layer_animation_controller.cc |
| +++ b/cc/animation/layer_animation_controller.cc |
| @@ -365,16 +365,12 @@ void LayerAnimationController::NotifyAnimationAborted( |
| void LayerAnimationController::NotifyAnimationPropertyUpdate( |
| const AnimationEvent& event) { |
| - bool notify_active_observers = true; |
| - bool notify_pending_observers = true; |
|
ajuma
2014/08/05 13:05:57
These variables act as a form of documentation all
shreyas.g
2014/08/05 13:41:52
Done. Makes sense. Will keep that in mind for futu
|
| switch (event.target_property) { |
| case Animation::Opacity: |
| - NotifyObserversOpacityAnimated( |
| - event.opacity, notify_active_observers, notify_pending_observers); |
| + NotifyObserversOpacityAnimated(event.opacity, true, true); |
| break; |
| case Animation::Transform: |
| - NotifyObserversTransformAnimated( |
| - event.transform, notify_active_observers, notify_pending_observers); |
| + NotifyObserversTransformAnimated(event.transform, true, true); |
| break; |
| default: |
| NOTREACHED(); |
| @@ -924,7 +920,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 +937,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 +954,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 +971,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); |
| } |