OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 570 |
571 // Use the map of all controllers, not just active ones, since non-active | 571 // Use the map of all controllers, not just active ones, since non-active |
572 // controllers may still receive events for impl-only animations. | 572 // controllers may still receive events for impl-only animations. |
573 const AnimationRegistrar::AnimationControllerMap& animation_controllers = | 573 const AnimationRegistrar::AnimationControllerMap& animation_controllers = |
574 animation_registrar_->all_animation_controllers(); | 574 animation_registrar_->all_animation_controllers(); |
575 AnimationRegistrar::AnimationControllerMap::const_iterator iter = | 575 AnimationRegistrar::AnimationControllerMap::const_iterator iter = |
576 animation_controllers.find(event_layer_id); | 576 animation_controllers.find(event_layer_id); |
577 if (iter != animation_controllers.end()) { | 577 if (iter != animation_controllers.end()) { |
578 switch ((*events)[event_index].type) { | 578 switch ((*events)[event_index].type) { |
579 case AnimationEvent::Started: | 579 case AnimationEvent::Started: |
580 (*iter).second->NotifyAnimationStarted((*events)[event_index], | 580 (*iter).second->NotifyAnimationStarted((*events)[event_index]); |
581 wall_clock_time.ToDoubleT()); | |
582 break; | 581 break; |
583 | 582 |
584 case AnimationEvent::Finished: | 583 case AnimationEvent::Finished: |
585 (*iter).second->NotifyAnimationFinished((*events)[event_index], | 584 (*iter).second->NotifyAnimationFinished((*events)[event_index]); |
586 wall_clock_time.ToDoubleT()); | |
587 break; | 585 break; |
588 | 586 |
589 case AnimationEvent::Aborted: | 587 case AnimationEvent::Aborted: |
590 (*iter).second->NotifyAnimationAborted((*events)[event_index]); | 588 (*iter).second->NotifyAnimationAborted((*events)[event_index]); |
591 break; | 589 break; |
592 | 590 |
593 case AnimationEvent::PropertyUpdate: | 591 case AnimationEvent::PropertyUpdate: |
594 (*iter).second->NotifyAnimationPropertyUpdate((*events)[event_index]); | 592 (*iter).second->NotifyAnimationPropertyUpdate((*events)[event_index]); |
595 break; | 593 break; |
596 } | 594 } |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 swap_promise_list_.push_back(swap_promise.Pass()); | 1310 swap_promise_list_.push_back(swap_promise.Pass()); |
1313 } | 1311 } |
1314 | 1312 |
1315 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1313 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1316 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1314 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1317 swap_promise_list_[i]->DidNotSwap(reason); | 1315 swap_promise_list_[i]->DidNotSwap(reason); |
1318 swap_promise_list_.clear(); | 1316 swap_promise_list_.clear(); |
1319 } | 1317 } |
1320 | 1318 |
1321 } // namespace cc | 1319 } // namespace cc |
OLD | NEW |