| 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 "content/browser/gpu/compositor_util.h" | 5 #include "content/browser/gpu/compositor_util.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 | 195 |
| 196 bool IsImplSidePaintingEnabled() { | 196 bool IsImplSidePaintingEnabled() { |
| 197 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 197 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 198 | 198 |
| 199 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) | 199 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) |
| 200 return false; | 200 return false; |
| 201 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) | 201 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) |
| 202 return true; | 202 return true; |
| 203 | 203 |
| 204 return IsThreadedCompositingEnabled(); | 204 #if defined(OS_ANDROID) |
| 205 return true; |
| 206 #else |
| 207 return false; |
| 208 #endif |
| 205 } | 209 } |
| 206 | 210 |
| 207 bool IsGpuRasterizationEnabled() { | 211 bool IsGpuRasterizationEnabled() { |
| 208 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 212 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 209 | 213 |
| 210 if (!IsImplSidePaintingEnabled()) | 214 if (!IsImplSidePaintingEnabled()) |
| 211 return false; | 215 return false; |
| 212 | 216 |
| 213 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) | 217 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) |
| 214 return false; | 218 return false; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 return problem_list; | 331 return problem_list; |
| 328 } | 332 } |
| 329 | 333 |
| 330 base::Value* GetDriverBugWorkarounds() { | 334 base::Value* GetDriverBugWorkarounds() { |
| 331 base::ListValue* workaround_list = new base::ListValue(); | 335 base::ListValue* workaround_list = new base::ListValue(); |
| 332 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 336 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
| 333 return workaround_list; | 337 return workaround_list; |
| 334 } | 338 } |
| 335 | 339 |
| 336 } // namespace content | 340 } // namespace content |
| OLD | NEW |