| 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 bool ForceSolidColorScrollbars() { |
| 141 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 142 cc::switches::kForceSolidColorScrollbars); |
| 143 } |
| 144 |
| 137 bool IsImplSidePaintingEnabled() { | 145 bool IsImplSidePaintingEnabled() { |
| 138 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 146 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 139 | 147 |
| 140 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 148 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
| 141 return false; | 149 return false; |
| 142 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 150 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
| 143 return true; | 151 return true; |
| 144 | 152 |
| 145 #if defined(OS_ANDROID) | 153 #if defined(OS_ANDROID) |
| 146 return true; | 154 return true; |
| 147 #else | 155 #else |
| 148 return false; | 156 return false; |
| 149 #endif | 157 #endif |
| 150 } | 158 } |
| 151 | 159 |
| 152 } // namespace switches | 160 } // namespace switches |
| 153 } // namespace cc | 161 } // namespace cc |
| OLD | NEW |