Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: cc/animation/animation_host.h

Issue 2040543002: Take MT jank into account when animating the scroll offset on CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/animation/animation_host.cc » ('j') | cc/input/input_handler.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 void ImplOnlyScrollAnimationCreate(ElementId element_id, 137 void ImplOnlyScrollAnimationCreate(ElementId element_id,
138 const gfx::ScrollOffset& target_offset, 138 const gfx::ScrollOffset& target_offset,
139 const gfx::ScrollOffset& current_offset); 139 const gfx::ScrollOffset& current_offset);
140 bool ImplOnlyScrollAnimationUpdateTarget( 140 bool ImplOnlyScrollAnimationUpdateTarget(
141 ElementId element_id, 141 ElementId element_id,
142 const gfx::Vector2dF& scroll_delta, 142 const gfx::Vector2dF& scroll_delta,
143 const gfx::ScrollOffset& max_scroll_offset, 143 const gfx::ScrollOffset& max_scroll_offset,
144 base::TimeTicks frame_monotonic_time); 144 base::TimeTicks frame_monotonic_time);
145 145
146 void ImplOnlyScrollAnimationAdjustDuration(ElementId element_id,
147 base::TimeDelta adjustment);
148
146 void ScrollAnimationAbort(bool needs_completion); 149 void ScrollAnimationAbort(bool needs_completion);
147 150
148 // This should only be called from the main thread. 151 // This should only be called from the main thread.
149 ScrollOffsetAnimations& scroll_offset_animations() const; 152 ScrollOffsetAnimations& scroll_offset_animations() const;
150 153
151 // Registers the given element animations as active. An active element 154 // Registers the given element animations as active. An active element
152 // animations is one that has a running animation that needs to be ticked. 155 // animations is one that has a running animation that needs to be ticked.
153 void DidActivateElementAnimations(ElementAnimations* element_animations); 156 void DidActivateElementAnimations(ElementAnimations* element_animations);
154 157
155 // Unregisters the given element animations. When this happens, the 158 // Unregisters the given element animations. When this happens, the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 198
196 bool supports_scroll_animations_; 199 bool supports_scroll_animations_;
197 bool animation_waiting_for_deletion_; 200 bool animation_waiting_for_deletion_;
198 201
199 DISALLOW_COPY_AND_ASSIGN(AnimationHost); 202 DISALLOW_COPY_AND_ASSIGN(AnimationHost);
200 }; 203 };
201 204
202 } // namespace cc 205 } // namespace cc
203 206
204 #endif // CC_ANIMATION_ANIMATION_HOST_H_ 207 #endif // CC_ANIMATION_ANIMATION_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation/animation_host.cc » ('j') | cc/input/input_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698