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 "ui/compositor/compositor_switches.h" | 5 #include "ui/compositor/compositor_switches.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 | 8 |
9 namespace switches { | 9 namespace switches { |
10 | 10 |
11 // Enable compositing individual elements via hardware overlays when | 11 // Enable compositing individual elements via hardware overlays when |
12 // permitted by device. | 12 // permitted by device. |
13 // Setting the flag to "single-fullscreen" will try to promote a single | 13 // Setting the flag to "single-fullscreen" will try to promote a single |
14 // fullscreen overlay and use it as main framebuffer where possible. | 14 // fullscreen overlay and use it as main framebuffer where possible. |
15 const char kEnableHardwareOverlays[] = "enable-hardware-overlays"; | 15 const char kEnableHardwareOverlays[] = "enable-hardware-overlays"; |
16 | 16 |
17 // Forces tests to produce pixel output when they normally wouldn't. | 17 // Forces tests to produce pixel output when they normally wouldn't. |
18 const char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests"; | 18 const char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests"; |
19 | 19 |
| 20 // Limits the compositor to output a certain number of frames per second, |
| 21 // maximum. |
| 22 const char kLimitFps[] = "limit-fps"; |
| 23 |
20 // Disable partial swap which is needed for some OpenGL drivers / emulators. | 24 // Disable partial swap which is needed for some OpenGL drivers / emulators. |
21 const char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; | 25 const char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; |
22 | 26 |
23 const char kUIEnableRGBA4444Textures[] = "ui-enable-rgba-4444-textures"; | 27 const char kUIEnableRGBA4444Textures[] = "ui-enable-rgba-4444-textures"; |
24 | 28 |
25 const char kUIEnableZeroCopy[] = "ui-enable-zero-copy"; | 29 const char kUIEnableZeroCopy[] = "ui-enable-zero-copy"; |
26 | 30 |
27 const char kUIShowPaintRects[] = "ui-show-paint-rects"; | 31 const char kUIShowPaintRects[] = "ui-show-paint-rects"; |
28 | 32 |
29 const char kUISlowAnimations[] = "ui-slow-animations"; | 33 const char kUISlowAnimations[] = "ui-slow-animations"; |
30 | 34 |
31 } // namespace switches | 35 } // namespace switches |
32 | 36 |
33 namespace ui { | 37 namespace ui { |
34 | 38 |
35 bool IsUIZeroCopyEnabled() { | 39 bool IsUIZeroCopyEnabled() { |
36 const base::CommandLine& command_line = | 40 const base::CommandLine& command_line = |
37 *base::CommandLine::ForCurrentProcess(); | 41 *base::CommandLine::ForCurrentProcess(); |
38 return command_line.HasSwitch(switches::kUIEnableZeroCopy); | 42 return command_line.HasSwitch(switches::kUIEnableZeroCopy); |
39 } | 43 } |
40 | 44 |
41 } // namespace ui | 45 } // namespace ui |
OLD | NEW |