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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h

Issue 2006103004: Send takeover msg from MT to CC using the animation path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jbroman nits Created 4 years, 7 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
Index: third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
index 2fa5de6a94a271b38de631c6fcb34592d3bd30e0..c13767e21d3c0eca3e534d6ac0bc45f053707ce7 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
@@ -34,7 +34,7 @@ public:
void dispose();
String runStateAsText() const;
- void updateImplOnlyScrollOffsetAnimation(const FloatSize& adjustment);
+ void adjustImplOnlyScrollOffsetAnimation(const FloatSize& adjustment);
virtual bool hasRunningAnimation() const { return false; }
@@ -43,7 +43,7 @@ public:
// Aborts the currently running scroll offset animation on the compositor
// and continues it on the main thread. This should only be called when in
// DocumentLifecycle::LifecycleState::CompositingClean state.
- virtual void takeoverCompositorAnimation();
+ virtual void takeOverCompositorAnimation();
virtual void updateCompositorAnimations();
virtual ScrollableArea* getScrollableArea() const = 0;
@@ -139,6 +139,15 @@ protected:
// An adjustment to the scroll offset on the main thread that may affect
// impl-only scroll offset animations.
FloatSize m_implOnlyAnimationAdjustment;
+
+ // If set to true, sends a cc::ScrollOffsetAnimationUpdate to cc which will
+ // abort the impl-only scroll offset animation and continue it on main
+ // thread.
+ bool m_implOnlyAnimationTakeover;
+
+private:
+ bool hasImplOnlyAnimationUpdate() const;
+ void takeOverImplOnlyScrollOffsetAnimation();
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698