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" | |
8 | |
9 namespace cc { | |
10 namespace switches { | 7 namespace switches { |
11 | 8 |
12 // On platforms where checkerboards are used, prefer background colors instead | 9 // On platforms where checkerboards are used, prefer background colors instead |
13 // of checkerboards. | 10 // of checkerboards. |
14 const char kBackgroundColorInsteadOfCheckerboard[] = | 11 const char kBackgroundColorInsteadOfCheckerboard[] = |
15 "background-color-instead-of-checkerboard"; | 12 "background-color-instead-of-checkerboard"; |
16 | 13 |
17 const char kDisableThreadedAnimation[] = "disable-threaded-animation"; | 14 const char kDisableThreadedAnimation[] = "disable-threaded-animation"; |
18 | 15 |
19 // Paint content on the main thread instead of the compositor thread. | 16 // Paint content on the main thread instead of the compositor thread. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // is not considered to be occluding the pixels behind it. | 117 // is not considered to be occluding the pixels behind it. |
121 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; | 118 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; |
122 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; | 119 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; |
123 | 120 |
124 // Enable the codepath that uses images within TileManager. | 121 // Enable the codepath that uses images within TileManager. |
125 const char kUseMapImage[] = "use-map-image"; | 122 const char kUseMapImage[] = "use-map-image"; |
126 | 123 |
127 // Prevents the layer tree unit tests from timing out. | 124 // Prevents the layer tree unit tests from timing out. |
128 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 125 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
129 | 126 |
130 bool IsImplSidePaintingEnabled() { | |
131 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
132 | |
133 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | |
134 return false; | |
135 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | |
136 return true; | |
137 | |
138 #if defined(OS_ANDROID) | |
139 return true; | |
140 #else | |
141 return false; | |
142 #endif | |
143 } | |
144 | |
145 } // namespace switches | 127 } // namespace switches |
146 } // namespace cc | |
OLD | NEW |