| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index e55fb8a94b1fbe3c877de83315d94ef5f1f5af49..0a5d7f7aff42cebe516d1a274af7eeefc6fdaa89 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -593,6 +593,16 @@ static bool ShouldUseFixedPositionCompositing(float device_scale_factor) {
|
| return DeviceScaleEnsuresTextQuality(device_scale_factor);
|
| }
|
|
|
| +static bool ShouldUseAcceleratedCompositingForOverflowScroll(
|
| + float device_scale_factor) {
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| +
|
| + if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll))
|
| + return true;
|
| +
|
| + return DeviceScaleEnsuresTextQuality(device_scale_factor);
|
| +}
|
| +
|
| static bool ShouldUseTransitionCompositing(float device_scale_factor) {
|
| const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
|
|
| @@ -882,6 +892,8 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) {
|
| webview()->setDeviceScaleFactor(device_scale_factor_);
|
| webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled(
|
| ShouldUseFixedPositionCompositing(device_scale_factor_));
|
| + webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
|
| + ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
|
| webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
|
| ShouldUseTransitionCompositing(device_scale_factor_));
|
|
|
| @@ -6220,6 +6232,8 @@ void RenderViewImpl::SetDeviceScaleFactor(float device_scale_factor) {
|
| webview()->setDeviceScaleFactor(device_scale_factor);
|
| webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled(
|
| ShouldUseFixedPositionCompositing(device_scale_factor_));
|
| + webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
|
| + ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
|
| webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
|
| ShouldUseTransitionCompositing(device_scale_factor_));
|
| }
|
|
|