| 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_host.h" | 5 #include "cc/animation/animation_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 bool AnimationHost::HasTickingAnimationForTesting(ElementId element_id) const { | 522 bool AnimationHost::HasTickingAnimationForTesting(ElementId element_id) const { |
| 523 auto element_animations = GetElementAnimationsForElementId(element_id); | 523 auto element_animations = GetElementAnimationsForElementId(element_id); |
| 524 return element_animations ? element_animations->HasTickingAnimation() : false; | 524 return element_animations ? element_animations->HasTickingAnimation() : false; |
| 525 } | 525 } |
| 526 | 526 |
| 527 void AnimationHost::ImplOnlyScrollAnimationCreate( | 527 void AnimationHost::ImplOnlyScrollAnimationCreate( |
| 528 ElementId element_id, | 528 ElementId element_id, |
| 529 const gfx::ScrollOffset& target_offset, | 529 const gfx::ScrollOffset& target_offset, |
| 530 const gfx::ScrollOffset& current_offset, | 530 const gfx::ScrollOffset& current_offset, |
| 531 base::TimeDelta delayed_by) { | 531 base::TimeDelta delayed_by, |
| 532 base::TimeDelta animation_start_offset) { |
| 532 DCHECK(scroll_offset_animations_impl_); | 533 DCHECK(scroll_offset_animations_impl_); |
| 533 scroll_offset_animations_impl_->ScrollAnimationCreate( | 534 scroll_offset_animations_impl_->ScrollAnimationCreate( |
| 534 element_id, target_offset, current_offset, delayed_by); | 535 element_id, target_offset, current_offset, delayed_by, |
| 536 animation_start_offset); |
| 535 } | 537 } |
| 536 | 538 |
| 537 bool AnimationHost::ImplOnlyScrollAnimationUpdateTarget( | 539 bool AnimationHost::ImplOnlyScrollAnimationUpdateTarget( |
| 538 ElementId element_id, | 540 ElementId element_id, |
| 539 const gfx::Vector2dF& scroll_delta, | 541 const gfx::Vector2dF& scroll_delta, |
| 540 const gfx::ScrollOffset& max_scroll_offset, | 542 const gfx::ScrollOffset& max_scroll_offset, |
| 541 base::TimeTicks frame_monotonic_time, | 543 base::TimeTicks frame_monotonic_time, |
| 542 base::TimeDelta delayed_by) { | 544 base::TimeDelta delayed_by) { |
| 543 DCHECK(scroll_offset_animations_impl_); | 545 DCHECK(scroll_offset_animations_impl_); |
| 544 return scroll_offset_animations_impl_->ScrollAnimationUpdateTarget( | 546 return scroll_offset_animations_impl_->ScrollAnimationUpdateTarget( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 574 const { | 576 const { |
| 575 return ticking_players_; | 577 return ticking_players_; |
| 576 } | 578 } |
| 577 | 579 |
| 578 const AnimationHost::ElementToAnimationsMap& | 580 const AnimationHost::ElementToAnimationsMap& |
| 579 AnimationHost::element_animations_for_testing() const { | 581 AnimationHost::element_animations_for_testing() const { |
| 580 return element_to_animations_map_; | 582 return element_to_animations_map_; |
| 581 } | 583 } |
| 582 | 584 |
| 583 } // namespace cc | 585 } // namespace cc |
| OLD | NEW |