| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Enable rasterizer that writes directly to GPU memory. | 128 // Enable rasterizer that writes directly to GPU memory. |
| 129 const char kEnableMapImage[] = "enable-map-image"; | 129 const char kEnableMapImage[] = "enable-map-image"; |
| 130 | 130 |
| 131 // Disable rasterizer that writes directly to GPU memory. | 131 // Disable rasterizer that writes directly to GPU memory. |
| 132 // Overrides the kEnableMapImage flag. | 132 // Overrides the kEnableMapImage flag. |
| 133 const char kDisableMapImage[] = "disable-map-image"; | 133 const char kDisableMapImage[] = "disable-map-image"; |
| 134 | 134 |
| 135 // Prevents the layer tree unit tests from timing out. | 135 // Prevents the layer tree unit tests from timing out. |
| 136 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 136 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
| 137 | 137 |
| 138 // Disable textures using RGBA_4444 layout. |
| 139 const char kDisable4444Textures[] = "disable-4444-textures"; |
| 140 |
| 138 bool IsImplSidePaintingEnabled() { | 141 bool IsImplSidePaintingEnabled() { |
| 139 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 142 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 140 | 143 |
| 141 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 144 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
| 142 return false; | 145 return false; |
| 143 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 146 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
| 144 return true; | 147 return true; |
| 145 | 148 |
| 146 #if defined(OS_ANDROID) | 149 #if defined(OS_ANDROID) |
| 147 return true; | 150 return true; |
| 148 #else | 151 #else |
| 149 return false; | 152 return false; |
| 150 #endif | 153 #endif |
| 151 } | 154 } |
| 152 | 155 |
| 153 bool IsMapImageEnabled() { | 156 bool IsMapImageEnabled() { |
| 154 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 157 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 155 | 158 |
| 156 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) | 159 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) |
| 157 return false; | 160 return false; |
| 158 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) | 161 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) |
| 159 return true; | 162 return true; |
| 160 | 163 |
| 161 return false; | 164 return false; |
| 162 } | 165 } |
| 163 | 166 |
| 164 } // namespace switches | 167 } // namespace switches |
| 165 } // namespace cc | 168 } // namespace cc |
| OLD | NEW |