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 bool IsImplSidePaintingEnabled() { | 99 bool IsImplSidePaintingEnabled() { |
94 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 100 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
95 | 101 |
96 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 102 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
97 return false; | 103 return false; |
98 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 104 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
99 return true; | 105 return true; |
100 | 106 |
101 #if defined(OS_ANDROID) | 107 #if defined(OS_ANDROID) |
102 return true; | 108 return true; |
103 #else | 109 #else |
104 return false; | 110 return false; |
105 #endif | 111 #endif |
106 } | 112 } |
107 | 113 |
108 } // namespace switches | 114 } // namespace switches |
109 } // namespace cc | 115 } // namespace cc |
OLD | NEW |