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

Unified Diff: content/renderer/render_view_impl.cc

Issue 571963003: Add a flag to disable threaded scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add warning 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 | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index eba0382f3453be34ace76c5ecbc5423274f14451..4c216957e87fc8a7bafa262d879dfe3eaad0b75c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -422,6 +422,15 @@ static bool ShouldUseTransitionCompositing(float device_scale_factor) {
return false;
}
+static bool ShouldUseThreadedScrolling() {
jam 2014/09/23 05:12:59 this should be inlined, we normally don't add meth
jdduke (slow) 2014/09/23 19:18:11 Done.
+ if (CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kDisableThreadedScrolling)) {
+ return false;
+ }
+
+ return true;
+}
+
static FaviconURL::IconType ToFaviconType(blink::WebIconURL::Type type) {
switch (type) {
case blink::WebIconURL::TypeFavicon:
@@ -759,6 +768,8 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) {
PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
ShouldUseTransitionCompositing(device_scale_factor_));
+ webview()->settings()->setThreadedScrollingEnabled(
+ ShouldUseThreadedScrolling());
ApplyWebPreferences(webkit_preferences_, webview());
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698