| 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 return !command_line.HasSwitch(switches::kDisableThreadedGpuRasterization); |
| 302 } |
| 303 |
| 295 bool UseSurfacesEnabled() { | 304 bool UseSurfacesEnabled() { |
| 296 #if defined(OS_ANDROID) | 305 #if defined(OS_ANDROID) |
| 297 return false; | 306 return false; |
| 298 #else | 307 #else |
| 299 const base::CommandLine& command_line = | 308 const base::CommandLine& command_line = |
| 300 *base::CommandLine::ForCurrentProcess(); | 309 *base::CommandLine::ForCurrentProcess(); |
| 301 | 310 |
| 302 return command_line.HasSwitch(switches::kUseSurfaces); | 311 return command_line.HasSwitch(switches::kUseSurfaces); |
| 303 #endif | 312 #endif |
| 304 } | 313 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 } | 427 } |
| 419 } | 428 } |
| 420 return problem_list; | 429 return problem_list; |
| 421 } | 430 } |
| 422 | 431 |
| 423 std::vector<std::string> GetDriverBugWorkarounds() { | 432 std::vector<std::string> GetDriverBugWorkarounds() { |
| 424 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 433 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 425 } | 434 } |
| 426 | 435 |
| 427 } // namespace content | 436 } // namespace content |
| OLD | NEW |