| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/animation/layer_animation_controller.h" | 5 #include "cc/animation/layer_animation_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 453 } |
| 454 | 454 |
| 455 void LayerAnimationController::NotifyAnimationAborted( | 455 void LayerAnimationController::NotifyAnimationAborted( |
| 456 const AnimationEvent& event) { | 456 const AnimationEvent& event) { |
| 457 bool aborted_transform_animation = false; | 457 bool aborted_transform_animation = false; |
| 458 for (size_t i = 0; i < animations_.size(); ++i) { | 458 for (size_t i = 0; i < animations_.size(); ++i) { |
| 459 if (animations_[i]->group() == event.group_id && | 459 if (animations_[i]->group() == event.group_id && |
| 460 animations_[i]->target_property() == event.target_property) { | 460 animations_[i]->target_property() == event.target_property) { |
| 461 animations_[i]->SetRunState(Animation::ABORTED, event.monotonic_time); | 461 animations_[i]->SetRunState(Animation::ABORTED, event.monotonic_time); |
| 462 animations_[i]->set_received_finished_event(true); | 462 animations_[i]->set_received_finished_event(true); |
| 463 if (layer_animation_delegate_) |
| 464 layer_animation_delegate_->NotifyAnimationAborted( |
| 465 event.monotonic_time, event.target_property, event.group_id); |
| 463 if (event.target_property == Animation::TRANSFORM) | 466 if (event.target_property == Animation::TRANSFORM) |
| 464 aborted_transform_animation = true; | 467 aborted_transform_animation = true; |
| 465 } | 468 } |
| 466 } | 469 } |
| 467 if (aborted_transform_animation) | 470 if (aborted_transform_animation) |
| 468 UpdatePotentiallyAnimatingTransform(); | 471 UpdatePotentiallyAnimatingTransform(); |
| 469 } | 472 } |
| 470 | 473 |
| 471 void LayerAnimationController::NotifyAnimationPropertyUpdate( | 474 void LayerAnimationController::NotifyAnimationPropertyUpdate( |
| 472 const AnimationEvent& event) { | 475 const AnimationEvent& event) { |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 &value_observers_); | 1250 &value_observers_); |
| 1248 LayerAnimationValueObserver* obs; | 1251 LayerAnimationValueObserver* obs; |
| 1249 while ((obs = it.GetNext()) != nullptr) | 1252 while ((obs = it.GetNext()) != nullptr) |
| 1250 if (obs->IsActive()) | 1253 if (obs->IsActive()) |
| 1251 return true; | 1254 return true; |
| 1252 } | 1255 } |
| 1253 return false; | 1256 return false; |
| 1254 } | 1257 } |
| 1255 | 1258 |
| 1256 } // namespace cc | 1259 } // namespace cc |
| OLD | NEW |