Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / compositor / compositor_switches.cc
blob7b8fed3ca9890f634a8b89575913a91cd21a18ab
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 // Enable compositing individual elements via hardware overlays when
12 // permitted by device.
13 const char kEnableHardwareOverlays[] = "enable-hardware-overlays";
15 // Forces tests to produce pixel output when they normally wouldn't.
16 const char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests";
18 const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing";
20 const char kUIEnableCompositorAnimationTimelines[] =
21 "ui-enable-compositor-animation-timelines";
23 const char kUIEnableImplSidePainting[] = "ui-enable-impl-side-painting";
25 const char kUIEnableSlimmingPaint[] = "ui-enable-slimming-paint";
27 const char kUIEnableZeroCopy[] = "ui-enable-zero-copy";
29 const char kUIShowPaintRects[] = "ui-show-paint-rects";
31 } // namespace switches
33 namespace ui {
35 bool IsUIImplSidePaintingEnabled() {
36 const base::CommandLine& command_line =
37 *base::CommandLine::ForCurrentProcess();
38 return command_line.HasSwitch(switches::kUIEnableImplSidePainting);
41 bool IsUIZeroCopyEnabled() {
42 const base::CommandLine& command_line =
43 *base::CommandLine::ForCurrentProcess();
44 return command_line.HasSwitch(switches::kUIEnableZeroCopy);
47 bool IsUIOneCopyEnabled() {
48 // One-copy is on by default unless zero copy is enabled.
49 return !IsUIZeroCopyEnabled();
52 bool IsUISlimmingPaintEnabled() {
53 const base::CommandLine& command_line =
54 *base::CommandLine::ForCurrentProcess();
55 return command_line.HasSwitch(switches::kUIEnableSlimmingPaint);
58 } // namespace ui