OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/base/switches.h" | 5 #include "cc/base/switches.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 namespace switches { | 10 namespace switches { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Show rects in the HUD around damage as it is recorded into each render | 86 // Show rects in the HUD around damage as it is recorded into each render |
87 // surface. | 87 // surface. |
88 const char kShowSurfaceDamageRects[] = "show-surface-damage-rects"; | 88 const char kShowSurfaceDamageRects[] = "show-surface-damage-rects"; |
89 const char kUIShowSurfaceDamageRects[] = "ui-show-surface-damage-rects"; | 89 const char kUIShowSurfaceDamageRects[] = "ui-show-surface-damage-rects"; |
90 | 90 |
91 // Show rects in the HUD around the screen-space transformed bounds of every | 91 // Show rects in the HUD around the screen-space transformed bounds of every |
92 // layer. | 92 // layer. |
93 const char kShowScreenSpaceRects[] = "show-screenspace-rects"; | 93 const char kShowScreenSpaceRects[] = "show-screenspace-rects"; |
94 const char kUIShowScreenSpaceRects[] = "ui-show-screenspace-rects"; | 94 const char kUIShowScreenSpaceRects[] = "ui-show-screenspace-rects"; |
95 | 95 |
| 96 // Don't allow compressed textures for tiles. |
| 97 const char kDisableTileCompression[] = "disable-tile-compression"; |
| 98 |
| 99 // Compress textures used for tiles if the gpu supports it. |
| 100 const char kEnableTileCompression[] = "enable-tile-compression"; |
| 101 |
| 102 // Only compress non-urgent tiles, where the urgent level can be any of the |
| 103 // different bins found in ManagedTileBin. Defaults to -1 which means all bins. |
| 104 const char kTileCompressionThreshold[] = "tile-compression-threshold"; |
| 105 |
| 106 // Set the preferred tile compression method. |
| 107 const char kTileCompressionMethod[] = "tile-compression-method"; |
| 108 |
| 109 bool IsTileCompressionEnabled() { |
| 110 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 111 |
| 112 if (command_line.HasSwitch(switches::kDisableTileCompression)) |
| 113 return false; |
| 114 else if (command_line.HasSwitch(switches::kEnableTileCompression)) |
| 115 return true; |
| 116 |
| 117 return false; |
| 118 } |
| 119 |
96 // Show rects in the HUD around the screen-space transformed bounds of every | 120 // Show rects in the HUD around the screen-space transformed bounds of every |
97 // layer's replica, when they have one. | 121 // layer's replica, when they have one. |
98 const char kShowReplicaScreenSpaceRects[] = "show-replica-screenspace-rects"; | 122 const char kShowReplicaScreenSpaceRects[] = "show-replica-screenspace-rects"; |
99 const char kUIShowReplicaScreenSpaceRects[] = | 123 const char kUIShowReplicaScreenSpaceRects[] = |
100 "ui-show-replica-screenspace-rects"; | 124 "ui-show-replica-screenspace-rects"; |
101 | 125 |
102 // Show rects in the HUD wherever something is known to be drawn opaque and is | 126 // Show rects in the HUD wherever something is known to be drawn opaque and is |
103 // considered occluding the pixels behind it. | 127 // considered occluding the pixels behind it. |
104 const char kShowOccludingRects[] = "show-occluding-rects"; | 128 const char kShowOccludingRects[] = "show-occluding-rects"; |
105 const char kUIShowOccludingRects[] = "ui-show-occluding-rects"; | 129 const char kUIShowOccludingRects[] = "ui-show-occluding-rects"; |
106 | 130 |
107 // Show rects in the HUD wherever something is not known to be drawn opaque and | 131 // Show rects in the HUD wherever something is not known to be drawn opaque and |
108 // is not considered to be occluding the pixels behind it. | 132 // is not considered to be occluding the pixels behind it. |
109 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; | 133 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; |
110 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; | 134 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; |
111 | 135 |
112 // Prevents the layer tree unit tests from timing out. | 136 // Prevents the layer tree unit tests from timing out. |
113 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 137 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
114 | 138 |
115 // Makes pixel tests write their output instead of read it. | 139 // Makes pixel tests write their output instead of read it. |
116 const char kCCRebaselinePixeltests[] = "cc-rebaseline-pixeltests"; | 140 const char kCCRebaselinePixeltests[] = "cc-rebaseline-pixeltests"; |
117 | 141 |
118 } // namespace switches | 142 } // namespace switches |
119 } // namespace cc | 143 } // namespace cc |
OLD | NEW |