| 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 const char kDisableTestCompositor[] = "disable-test-compositor"; | 11 const char kDisableTestCompositor[] = "disable-test-compositor"; |
| 12 | 12 |
| 13 const char kUIDisableDeadlineScheduling[] = "ui-disable-deadline-scheduling"; | 13 const char kUIDisableDeadlineScheduling[] = "ui-disable-deadline-scheduling"; |
| 14 | 14 |
| 15 const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing"; | 15 const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing"; |
| 16 | 16 |
| 17 const char kUIEnableDeadlineScheduling[] = "ui-enable-deadline-scheduling"; | 17 const char kUIEnableDeadlineScheduling[] = "ui-enable-deadline-scheduling"; |
| 18 | 18 |
| 19 const char kUIEnableSoftwareCompositing[] = "ui-enable-software-compositing"; | |
| 20 | |
| 21 const char kUIMaxFramesPending[] = "ui-max-frames-pending"; | 19 const char kUIMaxFramesPending[] = "ui-max-frames-pending"; |
| 22 | 20 |
| 23 const char kUIShowPaintRects[] = "ui-show-paint-rects"; | 21 const char kUIShowPaintRects[] = "ui-show-paint-rects"; |
| 24 | 22 |
| 25 bool IsUIDeadlineSchedulingEnabled() { | 23 bool IsUIDeadlineSchedulingEnabled() { |
| 26 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 24 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 27 | 25 |
| 28 // Default to disabled. | 26 // Default to disabled. |
| 29 bool enabled = false; | 27 bool enabled = false; |
| 30 | 28 |
| 31 // Default to enabled for Aura. | 29 // Default to enabled for Aura. |
| 32 enabled = true; | 30 enabled = true; |
| 33 | 31 |
| 34 // Flags override. | 32 // Flags override. |
| 35 enabled |= command_line.HasSwitch(switches::kUIEnableDeadlineScheduling); | 33 enabled |= command_line.HasSwitch(switches::kUIEnableDeadlineScheduling); |
| 36 enabled &= !command_line.HasSwitch(switches::kUIDisableDeadlineScheduling); | 34 enabled &= !command_line.HasSwitch(switches::kUIDisableDeadlineScheduling); |
| 37 | 35 |
| 38 return enabled; | 36 return enabled; |
| 39 } | 37 } |
| 40 | 38 |
| 41 } // namespace switches | 39 } // namespace switches |
| OLD | NEW |