Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: cc/switches.cc

Issue 12472028: Part 1 of cc/ directory shuffles: base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 "cc/switches.h"
6
7 #include "base/command_line.h"
8
9 namespace cc {
10 namespace switches {
11
12 // On platforms where checkerboards are used, prefer background colors instead
13 // of checkerboards.
14 const char kBackgroundColorInsteadOfCheckerboard[] =
15 "background-color-instead-of-checkerboard";
16
17 const char kDisableThreadedAnimation[] = "disable-threaded-animation";
18
19 // Send a message for every frame from the impl thread to the parent compositor.
20 const char kEnableCompositorFrameMessage[] = "enable-compositor-frame-message";
21
22 // Paint content on the main thread instead of the compositor thread.
23 // Overrides the kEnableImplSidePainting flag.
24 const char kDisableImplSidePainting[] = "disable-impl-side-painting";
25
26 // Paint content on the compositor thread instead of the main thread.
27 const char kEnableImplSidePainting[] = "enable-impl-side-painting";
28
29 const char kEnablePartialSwap[] = "enable-partial-swap";
30
31 const char kEnablePerTilePainting[] = "enable-per-tile-painting";
32
33 // Try to finish display pipeline before vsync tick
34 const char kEnableRightAlignedScheduling[] = "enable-right-aligned-scheduling";
35
36 const char kEnableTopControlsPositionCalculation[] =
37 "enable-top-controls-position-calculation";
38
39 // Enable solid tile color, transparent tile, and cheapness prediction metrics.
40 const char kEnablePredictionBenchmarking[] = "enable-prediction-benchmarking";
41
42 // The height of the movable top controls.
43 const char kTopControlsHeight[] = "top-controls-height";
44
45 // Percentage of the top controls need to be hidden before they will auto hide.
46 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold";
47
48 // Percentage of the top controls need to be shown before they will auto show.
49 const char kTopControlsShowThreshold[] = "top-controls-show-threshold";
50
51 // Number of worker threads used to rasterize content.
52 const char kNumRasterThreads[] = "num-raster-threads";
53
54 // Show rects in the HUD around layers whose properties have changed.
55 const char kShowPropertyChangedRects[] = "show-property-changed-rects";
56
57 // Show rects in the HUD around damage as it is recorded into each render
58 // surface.
59 const char kShowSurfaceDamageRects[] = "show-surface-damage-rects";
60
61 // Show rects in the HUD around the screen-space transformed bounds of every
62 // layer.
63 const char kShowScreenSpaceRects[] = "show-screenspace-rects";
64
65 // Show rects in the HUD around the screen-space transformed bounds of every
66 // layer's replica, when they have one.
67 const char kShowReplicaScreenSpaceRects[] = "show-replica-screenspace-rects";
68
69 // Show rects in the HUD wherever something is known to be drawn opaque and is
70 // considered occluding the pixels behind it.
71 const char kShowOccludingRects[] = "show-occluding-rects";
72
73 // Show rects in the HUD wherever something is not known to be drawn opaque and
74 // is not considered to be occluding the pixels behind it.
75 const char kShowNonOccludingRects[] = "show-nonoccluding-rects";
76
77 // Show metrics about overdraw in about:tracing recordings, such as the number
78 // of pixels culled, and the number of pixels drawn, for each frame.
79 const char kTraceOverdraw[] = "trace-overdraw";
80
81 // Logs all rendered frames.
82 const char kTraceAllRenderedFrames[] = "trace-all-rendered-frames";
83
84 // Re-rasters everything multiple times to simulate a much slower machine.
85 // Give a scale factor to cause raster to take that many times longer to
86 // complete, such as --slow-down-raster-scale-factor=25.
87 const char kSlowDownRasterScaleFactor[] = "slow-down-raster-scale-factor";
88
89 // Schedule rasterization jobs according to their estimated processing cost.
90 const char kUseCheapnessEstimator[] = "use-cheapness-estimator";
91
92 // Predict whether the tile will be either solid color or transparent.
93 const char kUseColorEstimator[] = "use-color-estimator";
94
95 // The scale factor for low resolution tile contents.
96 const char kLowResolutionContentsScaleFactor[] =
97 "low-resolution-contents-scale-factor";
98
99 // Causes the compositor to render to textures which are then sent to the parent
100 // through the texture mailbox mechanism.
101 // Requires --enable-compositor-frame-message.
102 const char kCompositeToMailbox[] = "composite-to-mailbox";
103
104 bool IsImplSidePaintingEnabled() {
105 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
106
107 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting))
108 return false;
109 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting))
110 return true;
111
112 #if defined(OS_ANDROID)
113 return true;
114 #else
115 return false;
116 #endif
117 }
118
119 } // namespace switches
120 } // namespace cc
OLDNEW
« cc/cc.gyp ('K') | « cc/switches.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698