| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CC_TREES_MUTATOR_HOST_H_ | 5 #ifndef CC_TREES_MUTATOR_HOST_H_ |
| 6 #define CC_TREES_MUTATOR_HOST_H_ | 6 #define CC_TREES_MUTATOR_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual void RegisterElement(ElementId element_id, | 42 virtual void RegisterElement(ElementId element_id, |
| 43 ElementListType list_type) = 0; | 43 ElementListType list_type) = 0; |
| 44 virtual void UnregisterElement(ElementId element_id, | 44 virtual void UnregisterElement(ElementId element_id, |
| 45 ElementListType list_type) = 0; | 45 ElementListType list_type) = 0; |
| 46 | 46 |
| 47 virtual void SetMutatorHostClient(MutatorHostClient* client) = 0; | 47 virtual void SetMutatorHostClient(MutatorHostClient* client) = 0; |
| 48 | 48 |
| 49 virtual void PushPropertiesTo(MutatorHost* host_impl) = 0; | 49 virtual void PushPropertiesTo(MutatorHost* host_impl) = 0; |
| 50 | 50 |
| 51 virtual void SetSupportsScrollAnimations(bool supports_scroll_animations) = 0; | 51 virtual void SetSupportsScrollAnimations(bool supports_scroll_animations) = 0; |
| 52 virtual bool NeedsAnimateLayers() const = 0; | 52 virtual bool NeedsTickAnimations() const = 0; |
| 53 | 53 |
| 54 virtual bool ActivateAnimations() = 0; | 54 virtual bool ActivateAnimations() = 0; |
| 55 virtual bool AnimateLayers(base::TimeTicks monotonic_time) = 0; | 55 virtual bool TickAnimations(base::TimeTicks monotonic_time) = 0; |
| 56 virtual bool UpdateAnimationState(bool start_ready_animations, | 56 virtual bool UpdateAnimationState(bool start_ready_animations, |
| 57 MutatorEvents* events) = 0; | 57 MutatorEvents* events) = 0; |
| 58 | 58 |
| 59 virtual std::unique_ptr<MutatorEvents> CreateEvents() = 0; | 59 virtual std::unique_ptr<MutatorEvents> CreateEvents() = 0; |
| 60 virtual void SetAnimationEvents(std::unique_ptr<MutatorEvents> events) = 0; | 60 virtual void SetAnimationEvents(std::unique_ptr<MutatorEvents> events) = 0; |
| 61 | 61 |
| 62 virtual bool ScrollOffsetAnimationWasInterrupted( | 62 virtual bool ScrollOffsetAnimationWasInterrupted( |
| 63 ElementId element_id) const = 0; | 63 ElementId element_id) const = 0; |
| 64 | 64 |
| 65 virtual bool IsAnimatingFilterProperty(ElementId element_id, | 65 virtual bool IsAnimatingFilterProperty(ElementId element_id, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 virtual bool AnimationsPreserveAxisAlignment(ElementId element_id) const = 0; | 103 virtual bool AnimationsPreserveAxisAlignment(ElementId element_id) const = 0; |
| 104 | 104 |
| 105 virtual bool MaximumTargetScale(ElementId element_id, | 105 virtual bool MaximumTargetScale(ElementId element_id, |
| 106 ElementListType list_type, | 106 ElementListType list_type, |
| 107 float* max_scale) const = 0; | 107 float* max_scale) const = 0; |
| 108 virtual bool AnimationStartScale(ElementId element_id, | 108 virtual bool AnimationStartScale(ElementId element_id, |
| 109 ElementListType list_type, | 109 ElementListType list_type, |
| 110 float* start_scale) const = 0; | 110 float* start_scale) const = 0; |
| 111 | 111 |
| 112 virtual bool HasAnyAnimation(ElementId element_id) const = 0; | 112 virtual bool HasAnyAnimation(ElementId element_id) const = 0; |
| 113 virtual bool HasActiveAnimationForTesting(ElementId element_id) const = 0; | 113 virtual bool HasTickingAnimationForTesting(ElementId element_id) const = 0; |
| 114 | 114 |
| 115 virtual void ImplOnlyScrollAnimationCreate( | 115 virtual void ImplOnlyScrollAnimationCreate( |
| 116 ElementId element_id, | 116 ElementId element_id, |
| 117 const gfx::ScrollOffset& target_offset, | 117 const gfx::ScrollOffset& target_offset, |
| 118 const gfx::ScrollOffset& current_offset, | 118 const gfx::ScrollOffset& current_offset, |
| 119 base::TimeDelta delayed_by) = 0; | 119 base::TimeDelta delayed_by) = 0; |
| 120 virtual bool ImplOnlyScrollAnimationUpdateTarget( | 120 virtual bool ImplOnlyScrollAnimationUpdateTarget( |
| 121 ElementId element_id, | 121 ElementId element_id, |
| 122 const gfx::Vector2dF& scroll_delta, | 122 const gfx::Vector2dF& scroll_delta, |
| 123 const gfx::ScrollOffset& max_scroll_offset, | 123 const gfx::ScrollOffset& max_scroll_offset, |
| 124 base::TimeTicks frame_monotonic_time, | 124 base::TimeTicks frame_monotonic_time, |
| 125 base::TimeDelta delayed_by) = 0; | 125 base::TimeDelta delayed_by) = 0; |
| 126 | 126 |
| 127 virtual void ScrollAnimationAbort(bool needs_completion) = 0; | 127 virtual void ScrollAnimationAbort(bool needs_completion) = 0; |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 class MutatorEvents { | 130 class MutatorEvents { |
| 131 public: | 131 public: |
| 132 virtual ~MutatorEvents() {} | 132 virtual ~MutatorEvents() {} |
| 133 virtual bool IsEmpty() const = 0; | 133 virtual bool IsEmpty() const = 0; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace cc | 136 } // namespace cc |
| 137 | 137 |
| 138 #endif // CC_TREES_MUTATOR_HOST_H_ | 138 #endif // CC_TREES_MUTATOR_HOST_H_ |
| OLD | NEW |