| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/animation_player.h" | 5 #include "cc/animation/animation_player.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "cc/animation/animation_delegate.h" | 10 #include "cc/animation/animation_delegate.h" |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 case TargetProperty::SCROLL_OFFSET: { | 777 case TargetProperty::SCROLL_OFFSET: { |
| 778 const ScrollOffsetAnimationCurve* scroll_offset_animation_curve = | 778 const ScrollOffsetAnimationCurve* scroll_offset_animation_curve = |
| 779 animations_[i]->curve()->ToScrollOffsetAnimationCurve(); | 779 animations_[i]->curve()->ToScrollOffsetAnimationCurve(); |
| 780 const gfx::ScrollOffset scroll_offset = | 780 const gfx::ScrollOffset scroll_offset = |
| 781 scroll_offset_animation_curve->GetValue(trimmed); | 781 scroll_offset_animation_curve->GetValue(trimmed); |
| 782 element_animations_->NotifyClientScrollOffsetAnimated( | 782 element_animations_->NotifyClientScrollOffsetAnimated( |
| 783 scroll_offset, animations_[i]->affects_active_elements(), | 783 scroll_offset, animations_[i]->affects_active_elements(), |
| 784 animations_[i]->affects_pending_elements()); | 784 animations_[i]->affects_pending_elements()); |
| 785 break; | 785 break; |
| 786 } | 786 } |
| 787 |
| 788 case TargetProperty::BOUNDS: { |
| 789 const SizeAnimationCurve* size_animation_curve = |
| 790 animations_[i]->curve()->ToSizeAnimationCurve(); |
| 791 const gfx::SizeF size = size_animation_curve->GetValue(trimmed); |
| 792 element_animations_->NotifyClientBoundsAnimated( |
| 793 size, animations_[i]->affects_active_elements(), |
| 794 animations_[i]->affects_pending_elements()); |
| 795 break; |
| 796 } |
| 787 } | 797 } |
| 788 } | 798 } |
| 789 } | 799 } |
| 790 | 800 |
| 791 last_tick_time_ = monotonic_time; | 801 last_tick_time_ = monotonic_time; |
| 792 } | 802 } |
| 793 | 803 |
| 794 void AnimationPlayer::MarkFinishedAnimations(base::TimeTicks monotonic_time) { | 804 void AnimationPlayer::MarkFinishedAnimations(base::TimeTicks monotonic_time) { |
| 795 bool animation_finished = false; | 805 bool animation_finished = false; |
| 796 | 806 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 if (current_impl) | 1215 if (current_impl) |
| 1206 animations_[i]->PushPropertiesTo(current_impl); | 1216 animations_[i]->PushPropertiesTo(current_impl); |
| 1207 } | 1217 } |
| 1208 | 1218 |
| 1209 animation_player_impl->scroll_offset_animation_was_interrupted_ = | 1219 animation_player_impl->scroll_offset_animation_was_interrupted_ = |
| 1210 scroll_offset_animation_was_interrupted_; | 1220 scroll_offset_animation_was_interrupted_; |
| 1211 scroll_offset_animation_was_interrupted_ = false; | 1221 scroll_offset_animation_was_interrupted_ = false; |
| 1212 } | 1222 } |
| 1213 | 1223 |
| 1214 } // namespace cc | 1224 } // namespace cc |
| OLD | NEW |