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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Enable the codepath that uses images within TileManager. | 127 // Enable the codepath that uses images within TileManager. |
128 const char kUseMapImage[] = "use-map-image"; | 128 const char kUseMapImage[] = "use-map-image"; |
129 | 129 |
130 // Prevents the layer tree unit tests from timing out. | 130 // Prevents the layer tree unit tests from timing out. |
131 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 131 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
132 | 132 |
133 // Trace events get dumped to stderr for debugging purposes. | 133 // Trace events get dumped to stderr for debugging purposes. |
134 const char kCCUnittestsTraceEventsToVLOG[] = | 134 const char kCCUnittestsTraceEventsToVLOG[] = |
135 "cc-unittests-trace-events-to-vlog"; | 135 "cc-unittests-trace-events-to-vlog"; |
136 | 136 |
| 137 // Allow forcing of solid-color scrollbars |
| 138 const char kForceSolidColorScrollbars[] = "force-solid-color-scrollbars"; |
| 139 |
| 140 // Solid-color scrollbar color in hex ARGB format, e.g. 0x80808080. |
| 141 // The 0x/0X prefix is optional. |
| 142 const char kSolidColorScrollbarColor[] = "solid-color-scrollbar-color"; |
| 143 |
| 144 // Solid-color scrollbar thickness in DIP. |
| 145 const char kSolidColorScrollbarThickness[] = "solid-color-scrollbar-thickness"; |
| 146 |
| 147 bool ForceSolidColorScrollbars() { |
| 148 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 149 cc::switches::kForceSolidColorScrollbars); |
| 150 } |
| 151 |
137 bool IsImplSidePaintingEnabled() { | 152 bool IsImplSidePaintingEnabled() { |
138 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 153 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
139 | 154 |
140 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 155 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
141 return false; | 156 return false; |
142 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 157 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
143 return true; | 158 return true; |
144 | 159 |
145 #if defined(OS_ANDROID) | 160 #if defined(OS_ANDROID) |
146 return true; | 161 return true; |
147 #else | 162 #else |
148 return false; | 163 return false; |
149 #endif | 164 #endif |
150 } | 165 } |
151 | 166 |
152 } // namespace switches | 167 } // namespace switches |
153 } // namespace cc | 168 } // namespace cc |
OLD | NEW |