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