OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/switches.h" | 5 #include "cc/switches.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 namespace switches { | 10 namespace switches { |
(...skipping 18 matching lines...) Expand all Loading... |
29 const char kEnablePartialSwap[] = "enable-partial-swap"; | 29 const char kEnablePartialSwap[] = "enable-partial-swap"; |
30 | 30 |
31 const char kEnablePerTilePainting[] = "enable-per-tile-painting"; | 31 const char kEnablePerTilePainting[] = "enable-per-tile-painting"; |
32 | 32 |
33 // Try to finish display pipeline before vsync tick | 33 // Try to finish display pipeline before vsync tick |
34 const char kEnableRightAlignedScheduling[] = "enable-right-aligned-scheduling"; | 34 const char kEnableRightAlignedScheduling[] = "enable-right-aligned-scheduling"; |
35 | 35 |
36 const char kEnableTopControlsPositionCalculation[] = | 36 const char kEnableTopControlsPositionCalculation[] = |
37 "enable-top-controls-position-calculation"; | 37 "enable-top-controls-position-calculation"; |
38 | 38 |
| 39 // Enable solid tile color, transparent tile, and cheapness prediction metrics. |
| 40 const char kEnablePredictionBenchmarking[] = "enable-prediction-benchmarking"; |
| 41 |
39 // The height of the movable top controls. | 42 // The height of the movable top controls. |
40 const char kTopControlsHeight[] = "top-controls-height"; | 43 const char kTopControlsHeight[] = "top-controls-height"; |
41 | 44 |
42 // Percentage of the top controls need to be hidden before they will auto hide. | 45 // Percentage of the top controls need to be hidden before they will auto hide. |
43 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; | 46 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; |
44 | 47 |
45 // Percentage of the top controls need to be shown before they will auto show. | 48 // Percentage of the top controls need to be shown before they will auto show. |
46 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; | 49 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; |
47 | 50 |
48 // Number of worker threads used to rasterize content. | 51 // Number of worker threads used to rasterize content. |
(...skipping 30 matching lines...) Expand all Loading... |
79 const char kTraceAllRenderedFrames[] = "trace-all-rendered-frames"; | 82 const char kTraceAllRenderedFrames[] = "trace-all-rendered-frames"; |
80 | 83 |
81 // Re-rasters everything multiple times to simulate a much slower machine. | 84 // Re-rasters everything multiple times to simulate a much slower machine. |
82 // Give a scale factor to cause raster to take that many times longer to | 85 // Give a scale factor to cause raster to take that many times longer to |
83 // complete, such as --slow-down-raster-scale-factor=25. | 86 // complete, such as --slow-down-raster-scale-factor=25. |
84 const char kSlowDownRasterScaleFactor[] = "slow-down-raster-scale-factor"; | 87 const char kSlowDownRasterScaleFactor[] = "slow-down-raster-scale-factor"; |
85 | 88 |
86 // Schedule rasterization jobs according to their estimated processing cost. | 89 // Schedule rasterization jobs according to their estimated processing cost. |
87 const char kUseCheapnessEstimator[] = "use-cheapness-estimator"; | 90 const char kUseCheapnessEstimator[] = "use-cheapness-estimator"; |
88 | 91 |
| 92 // Predict whether the tile will be either solid color or transparent. |
| 93 const char kUseColorEstimator[] = "use-color-estimator"; |
| 94 |
89 // The scale factor for low resolution tile contents. | 95 // The scale factor for low resolution tile contents. |
90 const char kLowResolutionContentsScaleFactor[] = | 96 const char kLowResolutionContentsScaleFactor[] = |
91 "low-resolution-contents-scale-factor"; | 97 "low-resolution-contents-scale-factor"; |
92 | 98 |
93 // Causes the compositor to render to textures which are then sent to the parent | 99 // Causes the compositor to render to textures which are then sent to the parent |
94 // through the texture mailbox mechanism. | 100 // through the texture mailbox mechanism. |
95 // Requires --enable-compositor-frame-message. | 101 // Requires --enable-compositor-frame-message. |
96 const char kCompositeToMailbox[] = "composite-to-mailbox"; | 102 const char kCompositeToMailbox[] = "composite-to-mailbox"; |
97 | 103 |
98 bool IsImplSidePaintingEnabled() { | 104 bool IsImplSidePaintingEnabled() { |
99 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 105 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
100 | 106 |
101 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 107 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
102 return false; | 108 return false; |
103 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 109 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
104 return true; | 110 return true; |
105 | 111 |
106 #if defined(OS_ANDROID) | 112 #if defined(OS_ANDROID) |
107 return true; | 113 return true; |
108 #else | 114 #else |
109 return false; | 115 return false; |
110 #endif | 116 #endif |
111 } | 117 } |
112 | 118 |
113 } // namespace switches | 119 } // namespace switches |
114 } // namespace cc | 120 } // namespace cc |
OLD | NEW |