| 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 GPU accelerated compositing + |
| 46 // impl-side painting. |
| 47 const char kEnableGPURasterization[] = "enable-gpu-rasterization"; |
| 48 |
| 44 // The height of the movable top controls. | 49 // The height of the movable top controls. |
| 45 const char kTopControlsHeight[] = "top-controls-height"; | 50 const char kTopControlsHeight[] = "top-controls-height"; |
| 46 | 51 |
| 47 // Percentage of the top controls need to be hidden before they will auto hide. | 52 // Percentage of the top controls need to be hidden before they will auto hide. |
| 48 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; | 53 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold"; |
| 49 | 54 |
| 50 // Percentage of the top controls need to be shown before they will auto show. | 55 // Percentage of the top controls need to be shown before they will auto show. |
| 51 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; | 56 const char kTopControlsShowThreshold[] = "top-controls-show-threshold"; |
| 52 | 57 |
| 53 // Number of worker threads used to rasterize content. | 58 // Number of worker threads used to rasterize content. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 return false; | 185 return false; |
| 181 #endif | 186 #endif |
| 182 } | 187 } |
| 183 } // namespace | 188 } // namespace |
| 184 | 189 |
| 185 bool IsImplSidePaintingEnabled() { | 190 bool IsImplSidePaintingEnabled() { |
| 186 static bool enabled = CheckImplSidePaintingStatus(); | 191 static bool enabled = CheckImplSidePaintingStatus(); |
| 187 return enabled; | 192 return enabled; |
| 188 } | 193 } |
| 189 | 194 |
| 195 bool IsGPURasterizationEnabled() { |
| 196 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 197 return command_line.HasSwitch(cc::switches::kEnableGPURasterization); |
| 198 } |
| 199 |
| 190 bool IsMapImageEnabled() { | 200 bool IsMapImageEnabled() { |
| 191 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 201 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 192 | 202 |
| 193 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) | 203 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) |
| 194 return false; | 204 return false; |
| 195 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) | 205 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) |
| 196 return true; | 206 return true; |
| 197 | 207 |
| 198 return false; | 208 return false; |
| 199 } | 209 } |
| 200 | 210 |
| 201 } // namespace switches | 211 } // namespace switches |
| 202 } // namespace cc | 212 } // namespace cc |
| OLD | NEW |