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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
682 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, | 682 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, |
683 video_memory_usage_stats); | 683 video_memory_usage_stats); |
684 } | 684 } |
685 | 685 |
686 void GpuDataManagerImplPrivate::AppendRendererCommandLine( | 686 void GpuDataManagerImplPrivate::AppendRendererCommandLine( |
687 base::CommandLine* command_line) const { | 687 base::CommandLine* command_line) const { |
688 DCHECK(command_line); | 688 DCHECK(command_line); |
689 | 689 |
690 if (ShouldDisableAcceleratedVideoDecode(command_line)) | 690 if (ShouldDisableAcceleratedVideoDecode(command_line)) |
691 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | 691 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
692 #if defined(ENABLE_WEBRTC) | 692 #if BUILDFLAG(ENABLE_WEBRTC) |
sky
2016/11/21 22:36:05
How come you don't include media/media_features in
brettw
2016/11/21 23:18:45
I missed this one (it's included in several "popul
| |
693 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && | 693 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
694 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) | 694 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
695 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); | 695 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
696 #endif | 696 #endif |
697 | 697 |
698 #if defined(USE_AURA) | 698 #if defined(USE_AURA) |
699 if (!CanUseGpuBrowserCompositor()) | 699 if (!CanUseGpuBrowserCompositor()) |
700 command_line->AppendSwitch(switches::kDisableGpuCompositing); | 700 command_line->AppendSwitch(switches::kDisableGpuCompositing); |
701 #endif | 701 #endif |
702 } | 702 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
765 } | 765 } |
766 | 766 |
767 #if defined(OS_WIN) | 767 #if defined(OS_WIN) |
768 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) && | 768 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) && |
769 gpu_preferences) { | 769 gpu_preferences) { |
770 gpu_preferences->enable_accelerated_vpx_decode = | 770 gpu_preferences->enable_accelerated_vpx_decode = |
771 gpu::GpuPreferences::VPX_VENDOR_NONE; | 771 gpu::GpuPreferences::VPX_VENDOR_NONE; |
772 } | 772 } |
773 #endif | 773 #endif |
774 | 774 |
775 #if defined(ENABLE_WEBRTC) | 775 #if BUILDFLAG(ENABLE_WEBRTC) |
776 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && | 776 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
777 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { | 777 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { |
778 if (gpu_preferences) { | 778 if (gpu_preferences) { |
779 gpu_preferences->disable_web_rtc_hw_encoding = true; | 779 gpu_preferences->disable_web_rtc_hw_encoding = true; |
780 } else { | 780 } else { |
781 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); | 781 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
782 } | 782 } |
783 } | 783 } |
784 #endif | 784 #endif |
785 | 785 |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1323 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1323 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1324 #if defined(OS_WIN) | 1324 #if defined(OS_WIN) |
1325 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1325 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1326 #endif | 1326 #endif |
1327 complete_gpu_info_already_requested_ = true; | 1327 complete_gpu_info_already_requested_ = true; |
1328 // Some observers might be waiting. | 1328 // Some observers might be waiting. |
1329 NotifyGpuInfoUpdate(); | 1329 NotifyGpuInfoUpdate(); |
1330 } | 1330 } |
1331 | 1331 |
1332 } // namespace content | 1332 } // namespace content |
OLD | NEW |