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

Unified Diff: content/renderer/render_view_impl.cc

Issue 26809004: Add a flag for enabling/disabling the new accelerated scrolling path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: About to reland. Created 7 years, 2 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') | webkit/common/webpreferences.h » ('j') | 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 18ac4b3e87968bab0bf0a865f9bddd2dfc6fed1b..6a47c7dff9957553ad779d737041831881340e29 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -639,6 +639,20 @@ static bool ShouldUseCompositedScrollingForFrames(
return DeviceScaleEnsuresTextQuality(device_scale_factor);
}
+static bool ShouldUseUniversalAcceleratedCompositingForOverflowScroll() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ if (command_line.HasSwitch(
+ switches::kDisableUniversalAcceleratedOverflowScroll))
+ return false;
+
+ if (command_line.HasSwitch(
+ switches::kEnableUniversalAcceleratedOverflowScroll))
+ return true;
+
+ return false;
+}
+
static bool ShouldUseTransitionCompositing(float device_scale_factor) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -928,6 +942,8 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) {
ShouldUseFixedPositionCompositing(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
+ webview()->settings()->setCompositorDrivenAcceleratedScrollingEnabled(
+ ShouldUseUniversalAcceleratedCompositingForOverflowScroll());
webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
ShouldUseTransitionCompositing(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
« no previous file with comments | « content/public/common/content_switches.cc ('k') | webkit/common/webpreferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698