| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 bool IsForceGpuRasterizationEnabled() { | 285 bool IsForceGpuRasterizationEnabled() { |
| 286 const base::CommandLine& command_line = | 286 const base::CommandLine& command_line = |
| 287 *base::CommandLine::ForCurrentProcess(); | 287 *base::CommandLine::ForCurrentProcess(); |
| 288 | 288 |
| 289 if (!IsImplSidePaintingEnabled()) | 289 if (!IsImplSidePaintingEnabled()) |
| 290 return false; | 290 return false; |
| 291 | 291 |
| 292 return command_line.HasSwitch(switches::kForceGpuRasterization); | 292 return command_line.HasSwitch(switches::kForceGpuRasterization); |
| 293 } | 293 } |
| 294 | 294 |
| 295 bool IsThreadedGpuRasterizationEnabled() { |
| 296 if (!IsImplSidePaintingEnabled()) |
| 297 return false; |
| 298 |
| 299 const base::CommandLine& command_line = |
| 300 *base::CommandLine::ForCurrentProcess(); |
| 301 |
| 302 if (command_line.HasSwitch(switches::kDisableThreadedGpuRasterization)) |
| 303 return false; |
| 304 if (command_line.HasSwitch(switches::kEnableThreadedGpuRasterization)) |
| 305 return true; |
| 306 |
| 307 return false; |
| 308 } |
| 309 |
| 295 bool UseSurfacesEnabled() { | 310 bool UseSurfacesEnabled() { |
| 296 #if defined(OS_ANDROID) | 311 #if defined(OS_ANDROID) |
| 297 return false; | 312 return false; |
| 298 #else | 313 #else |
| 299 const base::CommandLine& command_line = | 314 const base::CommandLine& command_line = |
| 300 *base::CommandLine::ForCurrentProcess(); | 315 *base::CommandLine::ForCurrentProcess(); |
| 301 | 316 |
| 302 return command_line.HasSwitch(switches::kUseSurfaces); | 317 return command_line.HasSwitch(switches::kUseSurfaces); |
| 303 #endif | 318 #endif |
| 304 } | 319 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 } | 433 } |
| 419 } | 434 } |
| 420 return problem_list; | 435 return problem_list; |
| 421 } | 436 } |
| 422 | 437 |
| 423 std::vector<std::string> GetDriverBugWorkarounds() { | 438 std::vector<std::string> GetDriverBugWorkarounds() { |
| 424 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 439 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 425 } | 440 } |
| 426 | 441 |
| 427 } // namespace content | 442 } // namespace content |
| OLD | NEW |