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

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: 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 1fb7ac98e37d6b3b87e1431a530bd25cd16a291e..e09fdf572a5e92dd183ae501ef138eecc6450195 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -45,6 +45,15 @@ const char kEnableGPURasterization[] = "enable-gpu-rasterization";
// Overrides the kEnableGPURasterization flag.
const char kDisableGPURasterization[] = "disable-gpu-rasterization";
+// 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";
@@ -176,6 +185,17 @@ bool IsGpuRasterizationEnabled() {
return false;
}
+bool IsLowResTilingEnabled() {
+ 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;
+}
+
bool IsImplSidePaintingEnabled() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();

Powered by Google App Engine
This is Rietveld 408576698