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 12 matching lines...) Expand all Loading... | |
23 const char kDisableCompositedAntialiasing[] = | 23 const char kDisableCompositedAntialiasing[] = |
24 "disable-composited-antialiasing"; | 24 "disable-composited-antialiasing"; |
25 | 25 |
26 // Paint content on the main thread instead of the compositor thread. | 26 // Paint content on the main thread instead of the compositor thread. |
27 // Overrides the kEnableImplSidePainting flag. | 27 // Overrides the kEnableImplSidePainting flag. |
28 const char kDisableImplSidePainting[] = "disable-impl-side-painting"; | 28 const char kDisableImplSidePainting[] = "disable-impl-side-painting"; |
29 | 29 |
30 // Enables LCD text. | 30 // Enables LCD text. |
31 const char kEnableLCDText[] = "enable-lcd-text"; | 31 const char kEnableLCDText[] = "enable-lcd-text"; |
32 | 32 |
33 // Enable bleeding-edge code to make Chrome draw content faster. The changes | |
34 // behind this path are very likely to break lots of content. | |
35 // ** DO NOT use this flag unless you know what you are doing. ** | |
36 // This is the same flag as the one defined in | |
37 // content/public/common/content_switches.cc. | |
jamesr
2014/02/22 00:30:04
no. if you want the behavior controlled by a cont
chrishtr
2014/02/22 00:33:11
Ok, I can do that, thanks for the pointer.
I don
chrishtr
2014/02/22 00:38:43
Done.
| |
38 const char kEnableBleedingEdgeRenderingFastPaths[] = | |
39 "enable-bleeding-edge-rendering-fast-paths"; | |
40 | |
33 // Paint content on the compositor thread instead of the main thread. | 41 // Paint content on the compositor thread instead of the main thread. |
34 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; | 42 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; |
35 | 43 |
36 const char kEnableTopControlsPositionCalculation[] = | 44 const char kEnableTopControlsPositionCalculation[] = |
37 "enable-top-controls-position-calculation"; | 45 "enable-top-controls-position-calculation"; |
38 | 46 |
39 // Allow heuristics to determine when a layer tile should be drawn with | 47 // Allow heuristics to determine when a layer tile should be drawn with |
40 // the Skia GPU backend. Only valid with GPU accelerated compositing + | 48 // the Skia GPU backend. Only valid with GPU accelerated compositing + |
41 // impl-side painting. | 49 // impl-side painting. |
42 const char kEnableGPURasterization[] = "enable-gpu-rasterization"; | 50 const char kEnableGPURasterization[] = "enable-gpu-rasterization"; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 #endif | 173 #endif |
166 } | 174 } |
167 | 175 |
168 bool IsGpuRasterizationEnabled() { | 176 bool IsGpuRasterizationEnabled() { |
169 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 177 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
170 | 178 |
171 if (command_line.HasSwitch(switches::kDisableGPURasterization)) | 179 if (command_line.HasSwitch(switches::kDisableGPURasterization)) |
172 return false; | 180 return false; |
173 else if (command_line.HasSwitch(switches::kEnableGPURasterization)) | 181 else if (command_line.HasSwitch(switches::kEnableGPURasterization)) |
174 return true; | 182 return true; |
183 else if (command_line.HasSwitch( | |
184 switches::kEnableBleedingEdgeRenderingFastPaths)) | |
185 return true; | |
175 | 186 |
176 return false; | 187 return false; |
177 } | 188 } |
178 | 189 |
179 bool IsImplSidePaintingEnabled() { | 190 bool IsImplSidePaintingEnabled() { |
180 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 191 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
181 | 192 |
182 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) | 193 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) |
183 return false; | 194 return false; |
184 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) | 195 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) |
(...skipping 12 matching lines...) Expand all Loading... | |
197 if (command_line.HasSwitch(switches::kDisableMapImage)) | 208 if (command_line.HasSwitch(switches::kDisableMapImage)) |
198 return false; | 209 return false; |
199 else if (command_line.HasSwitch(switches::kEnableMapImage)) | 210 else if (command_line.HasSwitch(switches::kEnableMapImage)) |
200 return true; | 211 return true; |
201 | 212 |
202 return false; | 213 return false; |
203 } | 214 } |
204 | 215 |
205 } // namespace switches | 216 } // namespace switches |
206 } // namespace cc | 217 } // namespace cc |
OLD | NEW |