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 22 matching lines...) Expand all Loading... |
33 #include "gpu/command_buffer/service/gpu_preferences.h" | 33 #include "gpu/command_buffer/service/gpu_preferences.h" |
34 #include "gpu/command_buffer/service/gpu_switches.h" | 34 #include "gpu/command_buffer/service/gpu_switches.h" |
35 #include "gpu/config/gpu_control_list_jsons.h" | 35 #include "gpu/config/gpu_control_list_jsons.h" |
36 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 36 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
37 #include "gpu/config/gpu_feature_type.h" | 37 #include "gpu/config/gpu_feature_type.h" |
38 #include "gpu/config/gpu_info_collector.h" | 38 #include "gpu/config/gpu_info_collector.h" |
39 #include "gpu/config/gpu_switches.h" | 39 #include "gpu/config/gpu_switches.h" |
40 #include "gpu/config/gpu_util.h" | 40 #include "gpu/config/gpu_util.h" |
41 #include "gpu/ipc/common/memory_stats.h" | 41 #include "gpu/ipc/common/memory_stats.h" |
42 #include "gpu/ipc/service/switches.h" | 42 #include "gpu/ipc/service/switches.h" |
| 43 #include "media/media_features.h" |
43 #include "ui/base/ui_base_switches.h" | 44 #include "ui/base/ui_base_switches.h" |
44 #include "ui/gl/gl_implementation.h" | 45 #include "ui/gl/gl_implementation.h" |
45 #include "ui/gl/gl_switches.h" | 46 #include "ui/gl/gl_switches.h" |
46 #include "ui/gl/gpu_switching_manager.h" | 47 #include "ui/gl/gpu_switching_manager.h" |
47 | 48 |
48 #if defined(OS_MACOSX) | 49 #if defined(OS_MACOSX) |
49 #include <ApplicationServices/ApplicationServices.h> | 50 #include <ApplicationServices/ApplicationServices.h> |
50 #endif // OS_MACOSX | 51 #endif // OS_MACOSX |
51 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
52 #include "base/win/windows_version.h" | 53 #include "base/win/windows_version.h" |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, | 683 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, |
683 video_memory_usage_stats); | 684 video_memory_usage_stats); |
684 } | 685 } |
685 | 686 |
686 void GpuDataManagerImplPrivate::AppendRendererCommandLine( | 687 void GpuDataManagerImplPrivate::AppendRendererCommandLine( |
687 base::CommandLine* command_line) const { | 688 base::CommandLine* command_line) const { |
688 DCHECK(command_line); | 689 DCHECK(command_line); |
689 | 690 |
690 if (ShouldDisableAcceleratedVideoDecode(command_line)) | 691 if (ShouldDisableAcceleratedVideoDecode(command_line)) |
691 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | 692 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
692 #if defined(ENABLE_WEBRTC) | 693 #if BUILDFLAG(ENABLE_WEBRTC) |
693 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && | 694 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
694 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) | 695 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
695 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); | 696 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
696 #endif | 697 #endif |
697 | 698 |
698 #if defined(USE_AURA) | 699 #if defined(USE_AURA) |
699 if (!CanUseGpuBrowserCompositor()) | 700 if (!CanUseGpuBrowserCompositor()) |
700 command_line->AppendSwitch(switches::kDisableGpuCompositing); | 701 command_line->AppendSwitch(switches::kDisableGpuCompositing); |
701 #endif | 702 #endif |
702 } | 703 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 766 } |
766 | 767 |
767 #if defined(OS_WIN) | 768 #if defined(OS_WIN) |
768 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) && | 769 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) && |
769 gpu_preferences) { | 770 gpu_preferences) { |
770 gpu_preferences->enable_accelerated_vpx_decode = | 771 gpu_preferences->enable_accelerated_vpx_decode = |
771 gpu::GpuPreferences::VPX_VENDOR_NONE; | 772 gpu::GpuPreferences::VPX_VENDOR_NONE; |
772 } | 773 } |
773 #endif | 774 #endif |
774 | 775 |
775 #if defined(ENABLE_WEBRTC) | 776 #if BUILDFLAG(ENABLE_WEBRTC) |
776 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && | 777 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
777 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { | 778 !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { |
778 if (gpu_preferences) { | 779 if (gpu_preferences) { |
779 gpu_preferences->disable_web_rtc_hw_encoding = true; | 780 gpu_preferences->disable_web_rtc_hw_encoding = true; |
780 } else { | 781 } else { |
781 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); | 782 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
782 } | 783 } |
783 } | 784 } |
784 #endif | 785 #endif |
785 | 786 |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1324 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1324 #if defined(OS_WIN) | 1325 #if defined(OS_WIN) |
1325 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1326 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1326 #endif | 1327 #endif |
1327 complete_gpu_info_already_requested_ = true; | 1328 complete_gpu_info_already_requested_ = true; |
1328 // Some observers might be waiting. | 1329 // Some observers might be waiting. |
1329 NotifyGpuInfoUpdate(); | 1330 NotifyGpuInfoUpdate(); |
1330 } | 1331 } |
1331 | 1332 |
1332 } // namespace content | 1333 } // namespace content |
OLD | NEW |