| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 void GpuDataManagerImplPrivate::AppendGpuCommandLine( | 650 void GpuDataManagerImplPrivate::AppendGpuCommandLine( |
| 651 base::CommandLine* command_line) const { | 651 base::CommandLine* command_line) const { |
| 652 DCHECK(command_line); | 652 DCHECK(command_line); |
| 653 | 653 |
| 654 std::string use_gl = | 654 std::string use_gl = |
| 655 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 655 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 656 switches::kUseGL); | 656 switches::kUseGL); |
| 657 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) | 657 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) |
| 658 command_line->AppendSwitch(switches::kDisableD3D11); | 658 command_line->AppendSwitch(switches::kDisableD3D11); |
| 659 if (gpu_driver_bugs_.find(gpu::DISABLE_DIRECT_COMPOSITION) != |
| 660 gpu_driver_bugs_.end()) |
| 661 command_line->AppendSwitch(switches::kDisableDirectComposition); |
| 659 if (use_swiftshader_) { | 662 if (use_swiftshader_) { |
| 660 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); | 663 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); |
| 661 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || | 664 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || |
| 662 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || | 665 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || |
| 663 IsFeatureBlacklisted( | 666 IsFeatureBlacklisted( |
| 664 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && | 667 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && |
| 665 (use_gl == "any")) { | 668 (use_gl == "any")) { |
| 666 command_line->AppendSwitchASCII( | 669 command_line->AppendSwitchASCII( |
| 667 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 670 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
| 668 } else if (!use_gl.empty()) { | 671 } else if (!use_gl.empty()) { |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1243 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1241 #if defined(OS_WIN) | 1244 #if defined(OS_WIN) |
| 1242 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1245 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1243 #endif | 1246 #endif |
| 1244 complete_gpu_info_already_requested_ = true; | 1247 complete_gpu_info_already_requested_ = true; |
| 1245 // Some observers might be waiting. | 1248 // Some observers might be waiting. |
| 1246 NotifyGpuInfoUpdate(); | 1249 NotifyGpuInfoUpdate(); |
| 1247 } | 1250 } |
| 1248 | 1251 |
| 1249 } // namespace content | 1252 } // namespace content |
| OLD | NEW |