| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index 6851b4e6200d69d6548b252321ba3842e8e9f4b6..542375d841919910da523e62e4ab62e4bc5e71b0 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -605,6 +605,18 @@ static bool ShouldUseTransitionCompositing(float device_scale_factor) {
|
| return DeviceScaleEnsuresTextQuality(device_scale_factor);
|
| }
|
|
|
| +static bool ShouldUseAcceleratedFixedRootBackground(float device_scale_factor) {
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| +
|
| + if (command_line.HasSwitch(switches::kDisableAcceleratedFixedRootBackground))
|
| + return false;
|
| +
|
| + if (command_line.HasSwitch(switches::kEnableAcceleratedFixedRootBackground))
|
| + return true;
|
| +
|
| + return DeviceScaleEnsuresTextQuality(device_scale_factor);
|
| +}
|
| +
|
| static FaviconURL::IconType ToFaviconType(WebKit::WebIconURL::Type type) {
|
| switch (type) {
|
| case WebKit::WebIconURL::TypeFavicon:
|
| @@ -878,6 +890,8 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) {
|
| ShouldUseFixedPositionCompositing(device_scale_factor_));
|
| webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
|
| ShouldUseTransitionCompositing(device_scale_factor_));
|
| + webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
|
| + ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
|
|
|
| webkit_glue::ApplyWebPreferences(webkit_preferences_, webview());
|
| webview()->initializeMainFrame(this);
|
| @@ -6197,6 +6211,9 @@ void RenderViewImpl::SetDeviceScaleFactor(float device_scale_factor) {
|
| ShouldUseFixedPositionCompositing(device_scale_factor_));
|
| webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
|
| ShouldUseTransitionCompositing(device_scale_factor_));
|
| + webview()->settings()->
|
| + setAcceleratedCompositingForFixedRootBackgroundEnabled(
|
| + ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
|
| }
|
| if (auto_resize_mode_)
|
| AutoResizeCompositor();
|
|
|