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

Unified Diff: content/renderer/render_view_impl.cc

Issue 479673003: Remove the acclerated overflow scroll and fixed root background flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 63b77c78387e0efe10893485302d181586a5ccf5..7b9ea0bba89272587081549b1a60ae56a64d09bc 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -408,19 +408,6 @@ static bool PreferCompositingToLCDText(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::kDisableAcceleratedOverflowScroll))
- return false;
-
- if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll))
- return true;
-
- return DeviceScaleEnsuresTextQuality(device_scale_factor);
-}
-
static bool ShouldUseCompositedScrollingForFrames(
float device_scale_factor) {
if (RenderThreadImpl::current() &&
@@ -445,18 +432,6 @@ static bool ShouldUseTransitionCompositing(float device_scale_factor) {
return false;
}
-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(blink::WebIconURL::Type type) {
switch (type) {
case blink::WebIconURL::TypeFavicon:
@@ -794,11 +769,11 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) {
webview()->settings()->setPreferCompositingToLCDTextEnabled(
PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
- ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
+ PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
ShouldUseTransitionCompositing(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
- ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
+ PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setCompositedScrollingForFramesEnabled(
ShouldUseCompositedScrollingForFrames(device_scale_factor_));
@@ -3766,12 +3741,13 @@ void RenderViewImpl::SetDeviceScaleFactor(float device_scale_factor) {
webview()->settings()->setPreferCompositingToLCDTextEnabled(
PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
- ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
+ PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
ShouldUseTransitionCompositing(device_scale_factor_));
- webview()->settings()->
- setAcceleratedCompositingForFixedRootBackgroundEnabled(
- ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
+ webview()
+ ->settings()
+ ->setAcceleratedCompositingForFixedRootBackgroundEnabled(
+ PreferCompositingToLCDText(device_scale_factor_));
webview()->settings()->setCompositedScrollingForFramesEnabled(
ShouldUseCompositedScrollingForFrames(device_scale_factor_));
}
« 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