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