| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 else if (command_line->HasSwitch(switches::kEnableLCDText)) | 158 else if (command_line->HasSwitch(switches::kEnableLCDText)) |
| 159 return true; | 159 return true; |
| 160 | 160 |
| 161 #if defined(OS_ANDROID) | 161 #if defined(OS_ANDROID) |
| 162 return false; | 162 return false; |
| 163 #else | 163 #else |
| 164 return true; | 164 return true; |
| 165 #endif | 165 #endif |
| 166 } | 166 } |
| 167 | 167 |
| 168 namespace { | 168 bool IsImplSidePaintingEnabled() { |
| 169 bool CheckImplSidePaintingStatus() { | |
| 170 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 169 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 171 | 170 |
| 172 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) | 171 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) |
| 173 return false; | 172 return false; |
| 174 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) | 173 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) |
| 175 return true; | 174 return true; |
| 176 | 175 |
| 177 #if defined(OS_ANDROID) | 176 #if defined(OS_ANDROID) |
| 178 return true; | 177 return true; |
| 179 #else | 178 #else |
| 180 return false; | 179 return false; |
| 181 #endif | 180 #endif |
| 182 } | 181 } |
| 183 | 182 |
| 184 bool CheckGPURasterizationStatus() { | |
| 185 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
| 186 return command_line.HasSwitch(switches::kEnableGPURasterization); | |
| 187 } | |
| 188 | |
| 189 } // namespace | |
| 190 | |
| 191 bool IsImplSidePaintingEnabled() { | |
| 192 static bool enabled = CheckImplSidePaintingStatus(); | |
| 193 return enabled; | |
| 194 } | |
| 195 | |
| 196 bool IsGPURasterizationEnabled() { | |
| 197 static bool enabled = CheckGPURasterizationStatus(); | |
| 198 return enabled; | |
| 199 } | |
| 200 | |
| 201 bool IsMapImageEnabled() { | 183 bool IsMapImageEnabled() { |
| 202 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 184 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 203 | 185 |
| 204 if (command_line.HasSwitch(switches::kDisableMapImage)) | 186 if (command_line.HasSwitch(switches::kDisableMapImage)) |
| 205 return false; | 187 return false; |
| 206 else if (command_line.HasSwitch(switches::kEnableMapImage)) | 188 else if (command_line.HasSwitch(switches::kEnableMapImage)) |
| 207 return true; | 189 return true; |
| 208 | 190 |
| 209 return false; | 191 return false; |
| 210 } | 192 } |
| 211 | 193 |
| 212 } // namespace switches | 194 } // namespace switches |
| 213 } // namespace cc | 195 } // namespace cc |
| OLD | NEW |