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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1782563002: Takeover MT initiated animations from the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « no previous file | third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 5b625b88bcb94c5507a30e9b1a6f1ce8709eeb48..81519c92079a31e70fb273201e4882bd74ef222b 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -685,9 +685,12 @@ void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainTh
{
if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view())
return;
- if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->view()->layerForScrolling())) {
+ GraphicsLayer* layer = m_page->deprecatedLocalMainFrame()->view()->layerForScrolling();
+ if (WebLayer* scrollLayer = toWebLayer(layer)) {
m_lastMainThreadScrollingReasons = mainThreadScrollingReasons;
if (mainThreadScrollingReasons) {
+ if (ScrollAnimatorBase* scrollAnimator = layer->scrollableArea()->existingScrollAnimator())
+ scrollAnimator->takeoverCompositorAnimation();
scrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReasons);
} else {
// Clear all main thread scrolling reasons except the one that's set
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698