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 { |
11 | 11 |
12 const char kDisableThreadedAnimation[] = "disable-threaded-animation"; | 12 const char kDisableThreadedAnimation[] = "disable-threaded-animation"; |
13 | 13 |
14 // Disables layer-edge anti-aliasing in the compositor. | 14 // Disables layer-edge anti-aliasing in the compositor. |
15 const char kDisableCompositedAntialiasing[] = | 15 const char kDisableCompositedAntialiasing[] = |
16 "disable-composited-antialiasing"; | 16 "disable-composited-antialiasing"; |
17 | 17 |
18 const char kEnableTopControlsPositionCalculation[] = | 18 const char kEnableTopControlsPositionCalculation[] = |
19 "enable-top-controls-position-calculation"; | 19 "enable-top-controls-position-calculation"; |
20 | 20 |
21 // When using CPU rasterizing generate low resolution tiling. Low res | |
22 // tiles may be displayed during fast scrolls especially on slower devices. | |
23 const char kEnableLowResTiling[] = "enable-low-res-tiling"; | |
24 | |
25 // When using CPU rasterizing disable low resolution tiling. This uses | |
26 // less power, particularly during animations, but more white may be seen | |
27 // during fast scrolling especially on slower devices. | |
28 const char kDisableLowResTiling[] = "disable-low-res-tiling"; | |
29 | |
21 // The height of the movable top controls. | 30 // The height of the movable top controls. |
22 const char kTopControlsHeight[] = "top-controls-height"; | 31 const char kTopControlsHeight[] = "top-controls-height"; |
23 | 32 |
24 // Percentage of the top controls need to be hidden before they will auto hide. | 33 // Percentage of the top controls need to be hidden before they will auto hide. |
25 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; | 34 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; |
26 | 35 |
27 // Percentage of the top controls need to be shown before they will auto show. | 36 // Percentage of the top controls need to be shown before they will auto show. |
28 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; | 37 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; |
29 | 38 |
30 // Show metrics about overdraw in about:tracing recordings, such as the number | 39 // Show metrics about overdraw in about:tracing recordings, such as the number |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 // Prevents the layer tree unit tests from timing out. | 116 // Prevents the layer tree unit tests from timing out. |
108 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 117 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
109 | 118 |
110 // Makes pixel tests write their output instead of read it. | 119 // Makes pixel tests write their output instead of read it. |
111 const char kCCRebaselinePixeltests[] = "cc-rebaseline-pixeltests"; | 120 const char kCCRebaselinePixeltests[] = "cc-rebaseline-pixeltests"; |
112 | 121 |
113 // Disable touch hit testing in the compositor. | 122 // Disable touch hit testing in the compositor. |
114 const char kDisableCompositorTouchHitTesting[] = | 123 const char kDisableCompositorTouchHitTesting[] = |
115 "disable-compositor-touch-hit-testing"; | 124 "disable-compositor-touch-hit-testing"; |
116 | 125 |
126 bool IsLowResTilingEnabled() { | |
piman
2014/03/13 00:52:00
Nit: this is only used in the renderer. Could this
| |
127 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
128 | |
129 if (command_line.HasSwitch(switches::kDisableLowResTiling)) | |
130 return false; | |
131 else if (command_line.HasSwitch(switches::kEnableLowResTiling)) | |
132 return true; | |
133 | |
134 return true; | |
135 } | |
136 | |
117 } // namespace switches | 137 } // namespace switches |
118 } // namespace cc | 138 } // namespace cc |
OLD | NEW |