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

Side by Side Diff: cc/animation/scroll_offset_animations_impl.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
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ 5 #ifndef CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_
6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ 6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void ScrollAnimationCreate(ElementId element_id, 34 void ScrollAnimationCreate(ElementId element_id,
35 const gfx::ScrollOffset& target_offset, 35 const gfx::ScrollOffset& target_offset,
36 const gfx::ScrollOffset& current_offset); 36 const gfx::ScrollOffset& current_offset);
37 37
38 bool ScrollAnimationUpdateTarget(ElementId element_id, 38 bool ScrollAnimationUpdateTarget(ElementId element_id,
39 const gfx::Vector2dF& scroll_delta, 39 const gfx::Vector2dF& scroll_delta,
40 const gfx::ScrollOffset& max_scroll_offset, 40 const gfx::ScrollOffset& max_scroll_offset,
41 base::TimeTicks frame_monotonic_time); 41 base::TimeTicks frame_monotonic_time);
42 42
43 void ScrollAnimationAdjustDuration(ElementId element_id,
44 base::TimeDelta adjustment);
45
43 // Aborts the currently running scroll offset animation on an element and 46 // Aborts the currently running scroll offset animation on an element and
44 // starts a new one offsetted by adjustment. 47 // starts a new one offsetted by adjustment.
45 void ScrollAnimationApplyAdjustment(ElementId element_id, 48 void ScrollAnimationApplyAdjustment(ElementId element_id,
46 const gfx::Vector2dF& adjustment); 49 const gfx::Vector2dF& adjustment);
47 50
48 void ScrollAnimationAbort(bool needs_completion); 51 void ScrollAnimationAbort(bool needs_completion);
49 52
50 // AnimationDelegate implementation. 53 // AnimationDelegate implementation.
51 void NotifyAnimationStarted(base::TimeTicks monotonic_time, 54 void NotifyAnimationStarted(base::TimeTicks monotonic_time,
52 TargetProperty::Type target_property, 55 TargetProperty::Type target_property,
(...skipping 20 matching lines...) Expand all
73 // I.e. only one element can have an impl-only scroll offset animation at 76 // I.e. only one element can have an impl-only scroll offset animation at
74 // any given time. 77 // any given time.
75 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_; 78 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_;
76 79
77 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl); 80 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl);
78 }; 81 };
79 82
80 } // namespace cc 83 } // namespace cc
81 84
82 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ 85 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698