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

Unified Diff: cc/animation/layer_animation_controller.cc

Issue 15732013: Allow animations with inactive observers to reach the Starting state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « cc/animation/layer_animation_controller.h ('k') | cc/animation/layer_animation_controller_unittest.cc » ('j') | 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 5e20dd5d6ee287e45b4264a34958e931d0478ecd..ce733223a12f1d0af4c82c713c819488ee9da09f 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -142,7 +142,7 @@ void LayerAnimationController::TransferAnimationsTo(
}
void LayerAnimationController::Animate(double monotonic_time) {
- if (!HasActiveValueObserver())
+ if (!HasValueObserver())
return;
StartAnimationsWaitingForNextTick(monotonic_time);
@@ -716,6 +716,15 @@ void LayerAnimationController::NotifyObserversTransformAnimated(
OnTransformAnimated(transform));
}
+bool LayerAnimationController::HasValueObserver() {
+ if (value_observers_.might_have_observers()) {
+ ObserverListBase<LayerAnimationValueObserver>::Iterator it(
+ value_observers_);
+ return it.GetNext() != NULL;
+ }
+ return false;
+}
+
bool LayerAnimationController::HasActiveValueObserver() {
if (value_observers_.might_have_observers()) {
ObserverListBase<LayerAnimationValueObserver>::Iterator it(
« no previous file with comments | « cc/animation/layer_animation_controller.h ('k') | cc/animation/layer_animation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698