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

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: s/accelerated/threaded/ 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
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9065ee3fd29c5bec78e7d5bd0d85ad734b35737c 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().threadedScrollingEnabled())
+ reasons |= ThreadedScrollingDisabled;
+
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::ThreadedScrollingDisabled)
+ stringBuilder.appendLiteral("Threaded scrolling is disabled, ");
if (stringBuilder.length())
stringBuilder.resize(stringBuilder.length() - 2);
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698