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 |