compositor_switches.cc revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
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// Forces tests to produce pixel output when they normally wouldn't.
12const char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests";
13
14const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing";
15
16const char kUIEnableImplSidePainting[] = "ui-enable-impl-side-painting";
17
18const char kUIEnableMapImage[] = "ui-enable-map-image";
19
20const char kUIShowPaintRects[] = "ui-show-paint-rects";
21
22}  // namespace switches
23
24namespace ui {
25
26bool IsUIImplSidePaintingEnabled() {
27  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
28
29  return command_line.HasSwitch(switches::kUIEnableImplSidePainting);
30}
31
32bool IsUIMapImageEnabled() {
33  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
34
35  return command_line.HasSwitch(switches::kUIEnableMapImage);
36}
37
38}  // namespace ui
39