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

Unified Diff: cc/base/switches.cc

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « cc/base/switches.h ('k') | cc/base/tile_compression_method.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/switches.cc
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index d34821e0fac6bf348af5fd66c7d282d33b484a1e..8505d8c21dff8d633b8cdc4907a184c16f973b2f 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -93,6 +93,30 @@ const char kUIShowSurfaceDamageRects[] = "ui-show-surface-damage-rects";
const char kShowScreenSpaceRects[] = "show-screenspace-rects";
const char kUIShowScreenSpaceRects[] = "ui-show-screenspace-rects";
+// Don't allow compressed textures for tiles.
+const char kDisableTileCompression[] = "disable-tile-compression";
+
+// Compress textures used for tiles if the gpu supports it.
+const char kEnableTileCompression[] = "enable-tile-compression";
+
+// Only compress non-urgent tiles, where the urgent level can be any of the
+// different bins found in ManagedTileBin. Defaults to -1 which means all bins.
+const char kTileCompressionThreshold[] = "tile-compression-threshold";
+
+// Set the preferred tile compression method.
+const char kTileCompressionMethod[] = "tile-compression-method";
+
+bool IsTileCompressionEnabled() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ if (command_line.HasSwitch(switches::kDisableTileCompression))
+ return false;
+ else if (command_line.HasSwitch(switches::kEnableTileCompression))
+ return true;
+
+ return false;
+}
+
// Show rects in the HUD around the screen-space transformed bounds of every
// layer's replica, when they have one.
const char kShowReplicaScreenSpaceRects[] = "show-replica-screenspace-rects";
« no previous file with comments | « cc/base/switches.h ('k') | cc/base/tile_compression_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698