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

Unified Diff: cc/base/switches.cc

Issue 196473007: Add --disable-low-res-tiling. Disable low res tiling to save power. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve merge conflicts Created 6 years, 9 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
Index: cc/base/switches.cc
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index 46f4992dd2ac4c73d598bd032a250ad55b8ae57a..108795d00211ac64cb6736886824c4b4342c8bad 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -18,6 +18,15 @@ const char kDisableCompositedAntialiasing[] =
const char kEnableTopControlsPositionCalculation[] =
"enable-top-controls-position-calculation";
+// When using CPU rasterizing generate low resolution tiling. Low res
+// tiles may be displayed during fast scrolls especially on slower devices.
+const char kEnableLowResTiling[] = "enable-low-res-tiling";
+
+// When using CPU rasterizing disable low resolution tiling. This uses
+// less power, particularly during animations, but more white may be seen
+// during fast scrolling especially on slower devices.
+const char kDisableLowResTiling[] = "disable-low-res-tiling";
+
// The height of the movable top controls.
const char kTopControlsHeight[] = "top-controls-height";
@@ -114,5 +123,16 @@ const char kCCRebaselinePixeltests[] = "cc-rebaseline-pixeltests";
const char kDisableCompositorTouchHitTesting[] =
"disable-compositor-touch-hit-testing";
+bool IsLowResTilingEnabled() {
piman 2014/03/13 00:52:00 Nit: this is only used in the renderer. Could this
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ if (command_line.HasSwitch(switches::kDisableLowResTiling))
+ return false;
+ else if (command_line.HasSwitch(switches::kEnableLowResTiling))
+ return true;
+
+ return true;
+}
+
} // namespace switches
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698