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

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

Issue 564043003: Add a setting to disable threaded scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 2db2e69dd0c8762232dcf3ca4f1d36631894f4f0..639ed0dadd602847267d4fd2321b5fccdd9ae303 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -922,6 +922,9 @@ MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() co
{
MainThreadScrollingReasons reasons = static_cast<MainThreadScrollingReasons>(0);
+ if (!m_page->settings().acceleratedScrollingEnabled())
+ reasons |= AcceleratedScrollingDisabled;
+
if (!m_page->mainFrame()->isLocalFrame())
return reasons;
FrameView* frameView = m_page->deprecatedLocalMainFrame()->view();
@@ -946,6 +949,8 @@ String ScrollingCoordinator::mainThreadScrollingReasonsAsText(MainThreadScrollin
stringBuilder.appendLiteral("Has viewport constrained objects without supporting fixed layers, ");
if (reasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)
stringBuilder.appendLiteral("Has non-layer viewport-constrained objects, ");
+ if (reasons & ScrollingCoordinator::AcceleratedScrollingDisabled)
+ stringBuilder.appendLiteral("Accelerated scrolling is disabled, ");
if (stringBuilder.length())
stringBuilder.resize(stringBuilder.length() - 2);

Powered by Google App Engine
This is Rietveld 408576698