| 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 base::FilePath swiftshader_path = | 657 base::FilePath swiftshader_path = |
| 658 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 658 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| 659 switches::kSwiftShaderPath); | 659 switches::kSwiftShaderPath); |
| 660 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) | 660 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) |
| 661 command_line->AppendSwitch(switches::kDisableD3D11); | 661 command_line->AppendSwitch(switches::kDisableD3D11); |
| 662 if (gpu_driver_bugs_.find(gpu::DISABLE_DIRECT_COMPOSITION) != | |
| 663 gpu_driver_bugs_.end()) | |
| 664 command_line->AppendSwitch(switches::kDisableDirectComposition); | |
| 665 if (use_swiftshader_) { | 662 if (use_swiftshader_) { |
| 666 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); | 663 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); |
| 667 if (swiftshader_path.empty()) | 664 if (swiftshader_path.empty()) |
| 668 swiftshader_path = swiftshader_path_; | 665 swiftshader_path = swiftshader_path_; |
| 669 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || | 666 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || |
| 670 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || | 667 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || |
| 671 IsFeatureBlacklisted( | 668 IsFeatureBlacklisted( |
| 672 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && | 669 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && |
| 673 (use_gl == "any")) { | 670 (use_gl == "any")) { |
| 674 command_line->AppendSwitchASCII( | 671 command_line->AppendSwitchASCII( |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1242 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1246 #if defined(OS_WIN) | 1243 #if defined(OS_WIN) |
| 1247 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1244 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1248 #endif | 1245 #endif |
| 1249 complete_gpu_info_already_requested_ = true; | 1246 complete_gpu_info_already_requested_ = true; |
| 1250 // Some observers might be waiting. | 1247 // Some observers might be waiting. |
| 1251 NotifyGpuInfoUpdate(); | 1248 NotifyGpuInfoUpdate(); |
| 1252 } | 1249 } |
| 1253 | 1250 |
| 1254 } // namespace content | 1251 } // namespace content |
| OLD | NEW |