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

Unified Diff: cc/animation/animation_host.cc

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: add test + apply suggested improvement Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/animation_host.h ('k') | cc/animation/animation_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_host.cc
diff --git a/cc/animation/animation_host.cc b/cc/animation/animation_host.cc
index 61489094ce75220abe3115dabc16275306014477..1ee55bc58edcb58b87cab66f017671d8513802a0 100644
--- a/cc/animation/animation_host.cc
+++ b/cc/animation/animation_host.cc
@@ -505,20 +505,23 @@ bool AnimationHost::HasActiveAnimationForTesting(ElementId element_id) const {
void AnimationHost::ImplOnlyScrollAnimationCreate(
ElementId element_id,
const gfx::ScrollOffset& target_offset,
- const gfx::ScrollOffset& current_offset) {
+ const gfx::ScrollOffset& current_offset,
+ base::TimeDelta delayed_by) {
DCHECK(scroll_offset_animations_impl_);
scroll_offset_animations_impl_->ScrollAnimationCreate(
- element_id, target_offset, current_offset);
+ element_id, target_offset, current_offset, delayed_by);
}
bool AnimationHost::ImplOnlyScrollAnimationUpdateTarget(
ElementId element_id,
const gfx::Vector2dF& scroll_delta,
const gfx::ScrollOffset& max_scroll_offset,
- base::TimeTicks frame_monotonic_time) {
+ base::TimeTicks frame_monotonic_time,
+ base::TimeDelta delayed_by) {
DCHECK(scroll_offset_animations_impl_);
return scroll_offset_animations_impl_->ScrollAnimationUpdateTarget(
- element_id, scroll_delta, max_scroll_offset, frame_monotonic_time);
+ element_id, scroll_delta, max_scroll_offset, frame_monotonic_time,
+ delayed_by);
}
ScrollOffsetAnimations& AnimationHost::scroll_offset_animations() const {
« no previous file with comments | « cc/animation/animation_host.h ('k') | cc/animation/animation_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698