compositor_switches.cc revision 5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1
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
9namespace switches {
10
11// Enable compositing individual elements via hardware overlays when
12// permitted by device.
13const char kEnableHardwareOverlays[] = "enable-hardware-overlays";
14
15// Forces tests to produce pixel output when they normally wouldn't.
16const char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests";
17
18const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing";
19
20const char kUIEnableImplSidePainting[] = "ui-enable-impl-side-painting";
21
22const char kUIEnableZeroCopy[] = "ui-enable-zero-copy";
23
24const char kUIShowPaintRects[] = "ui-show-paint-rects";
25
26}  // namespace switches
27
28namespace ui {
29
30bool IsUIImplSidePaintingEnabled() {
31  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
32
33  return command_line.HasSwitch(switches::kUIEnableImplSidePainting);
34}
35
36bool IsUIZeroCopyEnabled() {
37  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
38
39  return command_line.HasSwitch(switches::kUIEnableZeroCopy);
40}
41
42}  // namespace ui
43