| 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 #ifndef CC_ANIMATION_ANIMATION_HOST_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_HOST_H_ |
| 6 #define CC_ANIMATION_ANIMATION_HOST_H_ | 6 #define CC_ANIMATION_ANIMATION_HOST_H_ |
| 7 | 7 |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 bool HasPotentiallyRunningOpacityAnimation(int layer_id, | 108 bool HasPotentiallyRunningOpacityAnimation(int layer_id, |
| 109 LayerTreeType tree_type) const; | 109 LayerTreeType tree_type) const; |
| 110 bool HasPotentiallyRunningTransformAnimation(int layer_id, | 110 bool HasPotentiallyRunningTransformAnimation(int layer_id, |
| 111 LayerTreeType tree_type) const; | 111 LayerTreeType tree_type) const; |
| 112 | 112 |
| 113 bool HasAnyAnimationTargetingProperty(int layer_id, | 113 bool HasAnyAnimationTargetingProperty(int layer_id, |
| 114 TargetProperty::Type property) const; | 114 TargetProperty::Type property) const; |
| 115 | 115 |
| 116 bool FilterIsAnimatingOnImplOnly(int layer_id) const; | 116 bool FilterIsAnimatingOnImplOnly(int layer_id) const; |
| 117 bool OpacityIsAnimatingOnImplOnly(int layer_id) const; | 117 bool OpacityIsAnimatingOnImplOnly(int layer_id) const; |
| 118 bool ScrollOffsetIsAnimatingOnImplOnly(int layer_id) const; |
| 118 bool TransformIsAnimatingOnImplOnly(int layer_id) const; | 119 bool TransformIsAnimatingOnImplOnly(int layer_id) const; |
| 119 | 120 |
| 120 bool HasFilterAnimationThatInflatesBounds(int layer_id) const; | 121 bool HasFilterAnimationThatInflatesBounds(int layer_id) const; |
| 121 bool HasTransformAnimationThatInflatesBounds(int layer_id) const; | 122 bool HasTransformAnimationThatInflatesBounds(int layer_id) const; |
| 122 bool HasAnimationThatInflatesBounds(int layer_id) const; | 123 bool HasAnimationThatInflatesBounds(int layer_id) const; |
| 123 | 124 |
| 124 bool FilterAnimationBoundsForBox(int layer_id, | 125 bool FilterAnimationBoundsForBox(int layer_id, |
| 125 const gfx::BoxF& box, | 126 const gfx::BoxF& box, |
| 126 gfx::BoxF* bounds) const; | 127 gfx::BoxF* bounds) const; |
| 127 bool TransformAnimationBoundsForBox(int layer_id, | 128 bool TransformAnimationBoundsForBox(int layer_id, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 144 | 145 |
| 145 void ImplOnlyScrollAnimationCreate(int layer_id, | 146 void ImplOnlyScrollAnimationCreate(int layer_id, |
| 146 const gfx::ScrollOffset& target_offset, | 147 const gfx::ScrollOffset& target_offset, |
| 147 const gfx::ScrollOffset& current_offset); | 148 const gfx::ScrollOffset& current_offset); |
| 148 bool ImplOnlyScrollAnimationUpdateTarget( | 149 bool ImplOnlyScrollAnimationUpdateTarget( |
| 149 int layer_id, | 150 int layer_id, |
| 150 const gfx::Vector2dF& scroll_delta, | 151 const gfx::Vector2dF& scroll_delta, |
| 151 const gfx::ScrollOffset& max_scroll_offset, | 152 const gfx::ScrollOffset& max_scroll_offset, |
| 152 base::TimeTicks frame_monotonic_time); | 153 base::TimeTicks frame_monotonic_time); |
| 153 | 154 |
| 154 void ScrollAnimationAbort(); | 155 void ScrollAnimationAbort(bool needs_completion); |
| 155 | 156 |
| 156 private: | 157 private: |
| 157 explicit AnimationHost(ThreadInstance thread_instance); | 158 explicit AnimationHost(ThreadInstance thread_instance); |
| 158 | 159 |
| 159 void PushTimelinesToImplThread(AnimationHost* host_impl) const; | 160 void PushTimelinesToImplThread(AnimationHost* host_impl) const; |
| 160 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; | 161 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; |
| 161 void PushPropertiesToImplThread(AnimationHost* host_impl); | 162 void PushPropertiesToImplThread(AnimationHost* host_impl); |
| 162 | 163 |
| 163 void EraseTimelines(AnimationTimelineList::iterator begin, | 164 void EraseTimelines(AnimationTimelineList::iterator begin, |
| 164 AnimationTimelineList::iterator end); | 165 AnimationTimelineList::iterator end); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 178 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; | 179 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; |
| 179 | 180 |
| 180 const ThreadInstance thread_instance_; | 181 const ThreadInstance thread_instance_; |
| 181 | 182 |
| 182 DISALLOW_COPY_AND_ASSIGN(AnimationHost); | 183 DISALLOW_COPY_AND_ASSIGN(AnimationHost); |
| 183 }; | 184 }; |
| 184 | 185 |
| 185 } // namespace cc | 186 } // namespace cc |
| 186 | 187 |
| 187 #endif // CC_ANIMATION_ANIMATION_HOST_H_ | 188 #endif // CC_ANIMATION_ANIMATION_HOST_H_ |
| OLD | NEW |