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