| 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 "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 bool IsForceGpuRasterizationEnabled() { | 291 bool IsForceGpuRasterizationEnabled() { |
| 292 const base::CommandLine& command_line = | 292 const base::CommandLine& command_line = |
| 293 *base::CommandLine::ForCurrentProcess(); | 293 *base::CommandLine::ForCurrentProcess(); |
| 294 | 294 |
| 295 if (!IsImplSidePaintingEnabled()) | 295 if (!IsImplSidePaintingEnabled()) |
| 296 return false; | 296 return false; |
| 297 | 297 |
| 298 return command_line.HasSwitch(switches::kForceGpuRasterization); | 298 return command_line.HasSwitch(switches::kForceGpuRasterization); |
| 299 } | 299 } |
| 300 | 300 |
| 301 bool IsThreadedGpuRasterizationEnabled() { | |
| 302 if (!IsImplSidePaintingEnabled()) | |
| 303 return false; | |
| 304 if (!IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled()) | |
| 305 return false; | |
| 306 | |
| 307 const base::CommandLine& command_line = | |
| 308 *base::CommandLine::ForCurrentProcess(); | |
| 309 | |
| 310 if (command_line.HasSwitch(switches::kDisableThreadedGpuRasterization)) | |
| 311 return false; | |
| 312 | |
| 313 return true; | |
| 314 } | |
| 315 | |
| 316 bool UseSurfacesEnabled() { | 301 bool UseSurfacesEnabled() { |
| 317 #if defined(OS_ANDROID) | 302 #if defined(OS_ANDROID) |
| 318 return false; | 303 return false; |
| 319 #endif | 304 #endif |
| 320 bool enabled = false; | 305 bool enabled = false; |
| 321 #if defined(USE_AURA) || defined(OS_MACOSX) | 306 #if defined(USE_AURA) || defined(OS_MACOSX) |
| 322 enabled = true; | 307 enabled = true; |
| 323 #endif | 308 #endif |
| 324 | 309 |
| 325 const base::CommandLine& command_line = | 310 const base::CommandLine& command_line = |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 } | 431 } |
| 447 } | 432 } |
| 448 return problem_list; | 433 return problem_list; |
| 449 } | 434 } |
| 450 | 435 |
| 451 std::vector<std::string> GetDriverBugWorkarounds() { | 436 std::vector<std::string> GetDriverBugWorkarounds() { |
| 452 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 437 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 453 } | 438 } |
| 454 | 439 |
| 455 } // namespace content | 440 } // namespace content |
| OLD | NEW |