| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 void GpuDataManagerImplPrivate::AppendGpuCommandLine( | 692 void GpuDataManagerImplPrivate::AppendGpuCommandLine( |
| 693 base::CommandLine* command_line, | 693 base::CommandLine* command_line, |
| 694 gpu::GpuPreferences* gpu_preferences) const { | 694 gpu::GpuPreferences* gpu_preferences) const { |
| 695 DCHECK(command_line); | 695 DCHECK(command_line); |
| 696 | 696 |
| 697 std::string use_gl = | 697 std::string use_gl = |
| 698 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 698 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 699 switches::kUseGL); | 699 switches::kUseGL); |
| 700 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) | 700 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) |
| 701 command_line->AppendSwitch(switches::kDisableD3D11); | 701 command_line->AppendSwitch(switches::kDisableD3D11); |
| 702 if (gpu_driver_bugs_.find(gpu::DISABLE_ES3_GL_CONTEXT) != |
| 703 gpu_driver_bugs_.end()) { |
| 704 command_line->AppendSwitch(switches::kDisableES3GLContext); |
| 705 } |
| 702 if (gpu_driver_bugs_.find(gpu::DISABLE_DIRECT_COMPOSITION) != | 706 if (gpu_driver_bugs_.find(gpu::DISABLE_DIRECT_COMPOSITION) != |
| 703 gpu_driver_bugs_.end()) | 707 gpu_driver_bugs_.end()) { |
| 704 command_line->AppendSwitch(switches::kDisableDirectComposition); | 708 command_line->AppendSwitch(switches::kDisableDirectComposition); |
| 709 } |
| 705 if (use_swiftshader_) { | 710 if (use_swiftshader_) { |
| 706 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); | 711 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); |
| 707 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || | 712 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || |
| 708 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || | 713 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || |
| 709 IsFeatureBlacklisted( | 714 IsFeatureBlacklisted( |
| 710 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && | 715 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && |
| 711 (use_gl == "any")) { | 716 (use_gl == "any")) { |
| 712 command_line->AppendSwitchASCII(switches::kUseGL, | 717 command_line->AppendSwitchASCII(switches::kUseGL, |
| 713 gl::kGLImplementationOSMesaName); | 718 gl::kGLImplementationOSMesaName); |
| 714 } else if (!use_gl.empty()) { | 719 } else if (!use_gl.empty()) { |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1295 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1291 #if defined(OS_WIN) | 1296 #if defined(OS_WIN) |
| 1292 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1297 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1293 #endif | 1298 #endif |
| 1294 complete_gpu_info_already_requested_ = true; | 1299 complete_gpu_info_already_requested_ = true; |
| 1295 // Some observers might be waiting. | 1300 // Some observers might be waiting. |
| 1296 NotifyGpuInfoUpdate(); | 1301 NotifyGpuInfoUpdate(); |
| 1297 } | 1302 } |
| 1298 | 1303 |
| 1299 } // namespace content | 1304 } // namespace content |
| OLD | NEW |