| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // is not considered to be occluding the pixels behind it. | 124 // is not considered to be occluding the pixels behind it. |
| 125 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; | 125 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; |
| 126 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; | 126 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; |
| 127 | 127 |
| 128 // Enable the codepath that uses images within TileManager. | 128 // Enable the codepath that uses images within TileManager. |
| 129 const char kUseMapImage[] = "use-map-image"; | 129 const char kUseMapImage[] = "use-map-image"; |
| 130 | 130 |
| 131 // Prevents the layer tree unit tests from timing out. | 131 // Prevents the layer tree unit tests from timing out. |
| 132 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 132 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
| 133 | 133 |
| 134 // Enables overlay scrollbars on Aura or Linux. Does nothing on Mac. |
| 135 const char kEnableOverlayScrollbars[] = "enable-overlay-scrollbars"; |
| 136 |
| 137 bool AreOverlayScrollbarsEnabled() { |
| 138 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 139 cc::switches::kEnableOverlayScrollbars); |
| 140 } |
| 141 |
| 134 bool IsImplSidePaintingEnabled() { | 142 bool IsImplSidePaintingEnabled() { |
| 135 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 143 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 136 | 144 |
| 137 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 145 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
| 138 return false; | 146 return false; |
| 139 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 147 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
| 140 return true; | 148 return true; |
| 141 | 149 |
| 142 #if defined(OS_ANDROID) | 150 #if defined(OS_ANDROID) |
| 143 return true; | 151 return true; |
| 144 #else | 152 #else |
| 145 return false; | 153 return false; |
| 146 #endif | 154 #endif |
| 147 } | 155 } |
| 148 | 156 |
| 149 } // namespace switches | 157 } // namespace switches |
| 150 } // namespace cc | 158 } // namespace cc |
| OLD | NEW |