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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); | 678 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); |
679 base::FilePath swiftshader_path = | 679 base::FilePath swiftshader_path = |
680 CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 680 CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
681 switches::kSwiftShaderPath); | 681 switches::kSwiftShaderPath); |
682 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_MULTISAMPLING) && | 682 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_MULTISAMPLING) && |
683 !command_line->HasSwitch(switches::kDisableGLMultisampling)) { | 683 !command_line->HasSwitch(switches::kDisableGLMultisampling)) { |
684 command_line->AppendSwitch(switches::kDisableGLMultisampling); | 684 command_line->AppendSwitch(switches::kDisableGLMultisampling); |
685 } | 685 } |
686 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_TEXTURE_SHARING)) { | 686 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_TEXTURE_SHARING)) { |
687 command_line->AppendSwitch(switches::kDisableImageTransportSurface); | 687 command_line->AppendSwitch(switches::kDisableImageTransportSurface); |
688 reduce_sandbox = true; | |
689 } | 688 } |
690 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) | 689 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) |
691 command_line->AppendSwitch(switches::kDisableD3D11); | 690 command_line->AppendSwitch(switches::kDisableD3D11); |
692 if (use_swiftshader_) { | 691 if (use_swiftshader_) { |
693 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); | 692 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); |
694 if (swiftshader_path.empty()) | 693 if (swiftshader_path.empty()) |
695 swiftshader_path = swiftshader_path_; | 694 swiftshader_path = swiftshader_path_; |
696 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || | 695 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || |
697 IsFeatureBlacklisted( | 696 IsFeatureBlacklisted( |
698 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) || | 697 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) || |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 | 1261 |
1263 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1262 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
1264 gpu_process_accessible_ = false; | 1263 gpu_process_accessible_ = false; |
1265 gpu_info_.finalized = true; | 1264 gpu_info_.finalized = true; |
1266 complete_gpu_info_already_requested_ = true; | 1265 complete_gpu_info_already_requested_ = true; |
1267 // Some observers might be waiting. | 1266 // Some observers might be waiting. |
1268 NotifyGpuInfoUpdate(); | 1267 NotifyGpuInfoUpdate(); |
1269 } | 1268 } |
1270 | 1269 |
1271 } // namespace content | 1270 } // namespace content |
OLD | NEW |