Hide X11 dependencies when use_x11=0.
[chromium-blink-merge.git] / ui / compositor / compositor_switches.cc
blob55e7d8140b153309f14fe27e13bd5444778b4f68
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
3 // found in the LICENSE file.
5 #include "ui/compositor/compositor_switches.h"
7 #include "base/command_line.h"
9 namespace switches {
11 const char kDisableTestCompositor[] = "disable-test-compositor";
13 const char kUIDisableDeadlineScheduling[] = "ui-disable-deadline-scheduling";
15 const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing";
17 const char kUIEnableDeadlineScheduling[] = "ui-enable-deadline-scheduling";
19 const char kUIEnableSoftwareCompositing[] = "ui-enable-software-compositing";
21 const char kUIMaxFramesPending[] = "ui-max-frames-pending";
23 const char kUIShowPaintRects[] = "ui-show-paint-rects";
25 bool IsUIDeadlineSchedulingEnabled() {
26 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
28 // Default to disabled.
29 bool enabled = false;
31 // Default to enabled for Aura.
32 enabled = true;
34 // Flags override.
35 enabled |= command_line.HasSwitch(switches::kUIEnableDeadlineScheduling);
36 enabled &= !command_line.HasSwitch(switches::kUIDisableDeadlineScheduling);
38 return enabled;
41 } // namespace switches