compositor_switches.cc revision c5cede9ae108bb15f6b7a8aea21c7e1fefa2834c
1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// Use of this source code is governed by a BSD-style license that can be
3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// found in the LICENSE file.
4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "ui/compositor/compositor_switches.h"
6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "base/command_line.h"
8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
9baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace switches {
10baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// Enable compositing individual elements via hardware overlays when
12baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// permitted by device.
13baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst char kEnableHardwareOverlays[] = "enable-hardware-overlays";
14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
15baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// Forces tests to produce pixel output when they normally wouldn't.
16baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests";
17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
18baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing";
19baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
20baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst char kUIEnableImplSidePainting[] = "ui-enable-impl-side-painting";
21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
22baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst char kUIEnableMapImage[] = "ui-enable-map-image";
23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
24baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst char kUIShowPaintRects[] = "ui-show-paint-rects";
25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}  // namespace switches
27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
28baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace ui {
29baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
30baa3858d3f5d128a5c8466b700098109edcad5f2repo syncbool IsUIImplSidePaintingEnabled() {
31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
33baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  return command_line.HasSwitch(switches::kUIEnableImplSidePainting);
34baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}
35baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
36baa3858d3f5d128a5c8466b700098109edcad5f2repo syncbool IsUIMapImageEnabled() {
37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  return command_line.HasSwitch(switches::kUIEnableMapImage);
40baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}
41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}  // namespace ui
43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync