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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.h

Issue 1551933002: Fix retargeting of composited smooth scrolls from the main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 4 years, 11 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 | third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void cancelAnimation() override; 58 void cancelAnimation() override;
59 void resetAnimationState() override; 59 void resetAnimationState() override;
60 void updateCompositorAnimations() override; 60 void updateCompositorAnimations() override;
61 void notifyCompositorAnimationFinished(int groupId) override; 61 void notifyCompositorAnimationFinished(int groupId) override;
62 void layerForCompositedScrollingDidChange(WebCompositorAnimationTimeline*) o verride; 62 void layerForCompositedScrollingDidChange(WebCompositorAnimationTimeline*) o verride;
63 63
64 DECLARE_VIRTUAL_TRACE(); 64 DECLARE_VIRTUAL_TRACE();
65 65
66 protected: 66 protected:
67 OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve; 67 OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve;
68 double m_lastTickTime;
69 double m_startTime; 68 double m_startTime;
70 WTF::TimeFunction m_timeFunction; 69 WTF::TimeFunction m_timeFunction;
71 70
72 private: 71 private:
73 FloatPoint desiredTargetPosition() const; 72 FloatPoint desiredTargetPosition() const;
74 73
74 // Returns true if the animation was scheduled successfully. If animation
75 // could not be scheduled (e.g. because the frame is detached), scrolls
76 // immediately to the target and returns false.
77 bool registerAndScheduleAnimation();
78
75 FloatPoint m_targetOffset; 79 FloatPoint m_targetOffset;
76 }; 80 };
77 81
78 } // namespace blink 82 } // namespace blink
79 83
80 #endif // ScrollAnimator_h 84 #endif // ScrollAnimator_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698