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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { | 639 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { |
640 if (!command_line->HasSwitch(switches::kDisablePepper3d)) | 640 if (!command_line->HasSwitch(switches::kDisablePepper3d)) |
641 command_line->AppendSwitch(switches::kDisablePepper3d); | 641 command_line->AppendSwitch(switches::kDisablePepper3d); |
642 } | 642 } |
643 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && | 643 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && |
644 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) | 644 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) |
645 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); | 645 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
646 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && | 646 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
647 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 647 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
648 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | 648 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
| 649 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
| 650 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
| 651 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
649 | 652 |
650 if (use_software_compositor_ && | 653 if (use_software_compositor_ && |
651 !command_line->HasSwitch(switches::kEnableSoftwareCompositing)) | 654 !command_line->HasSwitch(switches::kEnableSoftwareCompositing)) |
652 command_line->AppendSwitch(switches::kEnableSoftwareCompositing); | 655 command_line->AppendSwitch(switches::kEnableSoftwareCompositing); |
653 | 656 |
654 #if defined(USE_AURA) | 657 #if defined(USE_AURA) |
655 if (!CanUseGpuBrowserCompositor()) { | 658 if (!CanUseGpuBrowserCompositor()) { |
656 command_line->AppendSwitch(switches::kDisableGpuCompositing); | 659 command_line->AppendSwitch(switches::kDisableGpuCompositing); |
657 command_line->AppendSwitch(switches::kDisablePepper3d); | 660 command_line->AppendSwitch(switches::kDisablePepper3d); |
658 } | 661 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 | 709 |
707 if (!gpu_driver_bugs_.empty()) { | 710 if (!gpu_driver_bugs_.empty()) { |
708 command_line->AppendSwitchASCII(switches::kGpuDriverBugWorkarounds, | 711 command_line->AppendSwitchASCII(switches::kGpuDriverBugWorkarounds, |
709 IntSetToString(gpu_driver_bugs_)); | 712 IntSetToString(gpu_driver_bugs_)); |
710 } | 713 } |
711 | 714 |
712 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && | 715 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
713 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { | 716 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { |
714 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | 717 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
715 } | 718 } |
| 719 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
| 720 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { |
| 721 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
| 722 } |
716 | 723 |
717 #if defined(OS_WIN) | 724 #if defined(OS_WIN) |
718 // DisplayLink 7.1 and earlier can cause the GPU process to crash on startup. | 725 // DisplayLink 7.1 and earlier can cause the GPU process to crash on startup. |
719 // http://crbug.com/177611 | 726 // http://crbug.com/177611 |
720 // Thinkpad USB Port Replicator driver causes GPU process to crash when the | 727 // Thinkpad USB Port Replicator driver causes GPU process to crash when the |
721 // sandbox is enabled. http://crbug.com/181665. | 728 // sandbox is enabled. http://crbug.com/181665. |
722 if ((gpu_info_.display_link_version.IsValid() | 729 if ((gpu_info_.display_link_version.IsValid() |
723 && gpu_info_.display_link_version.IsOlderThan("7.2")) || | 730 && gpu_info_.display_link_version.IsOlderThan("7.2")) || |
724 gpu_info_.lenovo_dcute) { | 731 gpu_info_.lenovo_dcute) { |
725 reduce_sandbox = true; | 732 reduce_sandbox = true; |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 | 1212 |
1206 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1213 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
1207 gpu_process_accessible_ = false; | 1214 gpu_process_accessible_ = false; |
1208 gpu_info_.finalized = true; | 1215 gpu_info_.finalized = true; |
1209 complete_gpu_info_already_requested_ = true; | 1216 complete_gpu_info_already_requested_ = true; |
1210 // Some observers might be waiting. | 1217 // Some observers might be waiting. |
1211 NotifyGpuInfoUpdate(); | 1218 NotifyGpuInfoUpdate(); |
1212 } | 1219 } |
1213 | 1220 |
1214 } // namespace content | 1221 } // namespace content |
OLD | NEW |