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/base/switches.h" | 5 #include "cc/base/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 23 matching lines...) Expand all Loading... | |
34 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; | 34 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; |
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 // For any layers that can get drawn directly to screen, draw them with the Skia | 39 // For any layers that can get drawn directly to screen, draw them with the Skia |
40 // GPU backend. Only valid with gl rendering + threaded compositing + impl-side | 40 // GPU backend. Only valid with gl rendering + threaded compositing + impl-side |
41 // painting. | 41 // painting. |
42 const char kForceDirectLayerDrawing[] = "force-direct-layer-drawing"; | 42 const char kForceDirectLayerDrawing[] = "force-direct-layer-drawing"; |
43 | 43 |
44 // Allow heuristics to determine when a layer tile should be drawn with | |
45 // the Skia GPU backend. Only valid with gl rendering + threaded compositing + | |
enne (OOO)
2013/11/25 22:43:32
To be future proof, I wouldn't mention threaded co
Vangelis Kokkevis
2013/11/25 22:53:52
And instead of "gl rendering" this should probabl
| |
46 // impl-side painting. | |
47 | |
enne (OOO)
2013/11/25 22:43:32
nit: empty line doesn't match style of rest of the
| |
48 const char kEnableGPURasterization[] = "enable-gpu-rasterization"; | |
49 | |
44 // The height of the movable top controls. | 50 // The height of the movable top controls. |
45 const char kTopControlsHeight[] = "top-controls-height"; | 51 const char kTopControlsHeight[] = "top-controls-height"; |
46 | 52 |
47 // Percentage of the top controls need to be hidden before they will auto hide. | 53 // Percentage of the top controls need to be hidden before they will auto hide. |
48 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; | 54 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; |
49 | 55 |
50 // Percentage of the top controls need to be shown before they will auto show. | 56 // Percentage of the top controls need to be shown before they will auto show. |
51 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; | 57 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; |
52 | 58 |
53 // Number of worker threads used to rasterize content. | 59 // Number of worker threads used to rasterize content. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 return false; | 186 return false; |
181 #endif | 187 #endif |
182 } | 188 } |
183 } // namespace | 189 } // namespace |
184 | 190 |
185 bool IsImplSidePaintingEnabled() { | 191 bool IsImplSidePaintingEnabled() { |
186 static bool enabled = CheckImplSidePaintingStatus(); | 192 static bool enabled = CheckImplSidePaintingStatus(); |
187 return enabled; | 193 return enabled; |
188 } | 194 } |
189 | 195 |
196 bool IsGPURasterizationEnabled() { | |
197 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
198 return command_line.HasSwitch(cc::switches::kEnableGPURasterization); | |
199 } | |
200 | |
190 bool IsMapImageEnabled() { | 201 bool IsMapImageEnabled() { |
191 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 202 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
192 | 203 |
193 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) | 204 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) |
194 return false; | 205 return false; |
195 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) | 206 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) |
196 return true; | 207 return true; |
197 | 208 |
198 return false; | 209 return false; |
199 } | 210 } |
200 | 211 |
201 } // namespace switches | 212 } // namespace switches |
202 } // namespace cc | 213 } // namespace cc |
OLD | NEW |