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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Show rects in the HUD wherever something is known to be drawn opaque and is | 134 // Show rects in the HUD wherever something is known to be drawn opaque and is |
135 // considered occluding the pixels behind it. | 135 // considered occluding the pixels behind it. |
136 const char kShowOccludingRects[] = "show-occluding-rects"; | 136 const char kShowOccludingRects[] = "show-occluding-rects"; |
137 const char kUIShowOccludingRects[] = "ui-show-occluding-rects"; | 137 const char kUIShowOccludingRects[] = "ui-show-occluding-rects"; |
138 | 138 |
139 // Show rects in the HUD wherever something is not known to be drawn opaque and | 139 // Show rects in the HUD wherever something is not known to be drawn opaque and |
140 // is not considered to be occluding the pixels behind it. | 140 // is not considered to be occluding the pixels behind it. |
141 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; | 141 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; |
142 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; | 142 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; |
143 | 143 |
| 144 // Prevents the layer tree unit tests from timing out. |
| 145 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
| 146 |
| 147 // Trace events get dumped to stderr for debugging purposes. |
| 148 const char kCCUnittestsTraceEventsToStderr[] = |
| 149 "cc-unittests-trace-events-to-stderr"; |
| 150 |
144 bool IsImplSidePaintingEnabled() { | 151 bool IsImplSidePaintingEnabled() { |
145 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 152 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
146 | 153 |
147 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 154 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
148 return false; | 155 return false; |
149 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 156 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
150 return true; | 157 return true; |
151 | 158 |
152 #if defined(OS_ANDROID) | 159 #if defined(OS_ANDROID) |
153 return true; | 160 return true; |
154 #else | 161 #else |
155 return false; | 162 return false; |
156 #endif | 163 #endif |
157 } | 164 } |
158 | 165 |
159 } // namespace switches | 166 } // namespace switches |
160 } // namespace cc | 167 } // namespace cc |
OLD | NEW |