| 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 | 770 |
| 771 #if defined(OS_WIN) | 771 #if defined(OS_WIN) |
| 772 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) && | 772 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) && |
| 773 gpu_preferences) { | 773 gpu_preferences) { |
| 774 gpu_preferences->enable_accelerated_vpx_decode = | 774 gpu_preferences->enable_accelerated_vpx_decode = |
| 775 gpu::GpuPreferences::VPX_VENDOR_NONE; | 775 gpu::GpuPreferences::VPX_VENDOR_NONE; |
| 776 } | 776 } |
| 777 #endif | 777 #endif |
| 778 | 778 |
| 779 #if BUILDFLAG(ENABLE_WEBRTC) | 779 #if BUILDFLAG(ENABLE_WEBRTC) |
| 780 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && | 780 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE)) { |
| 781 !command_line->HasSwitch(switches::kDisableWebRtcHWVP8Encoding) && | 781 #if defined (OS_ANDROID) |
| 782 !base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding)) { | 782 // On Android HW H264 is enabled by default behind a flag now, regardless of |
| 783 if (gpu_preferences) { | 783 // the blacklist. Disable HW encoding if every single HW codec is disabled. |
| 784 // TODO(braveyao): remove this once the blacklist is removed |
| 785 // (crbug.com/638664). |
| 786 if (!base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding)) { |
| 787 #endif |
| 788 if (!command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
| 789 command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); |
| 790 if (gpu_preferences) |
| 784 gpu_preferences->disable_web_rtc_hw_encoding = true; | 791 gpu_preferences->disable_web_rtc_hw_encoding = true; |
| 785 } else { | 792 #if defined (OS_ANDROID) |
| 786 command_line->AppendSwitch(switches::kDisableWebRtcHWVP8Encoding); | |
| 787 } | |
| 788 } | 793 } |
| 789 #endif | 794 #endif |
| 795 } |
| 796 #endif |
| 790 | 797 |
| 791 if (gpu_preferences) { // enable_es3_apis | 798 if (gpu_preferences) { // enable_es3_apis |
| 792 bool blacklisted = IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL2); | 799 bool blacklisted = IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL2); |
| 793 bool enabled = base::CommandLine::ForCurrentProcess()->HasSwitch( | 800 bool enabled = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 794 switches::kEnableES3APIs); | 801 switches::kEnableES3APIs); |
| 795 bool disabled = base::CommandLine::ForCurrentProcess()->HasSwitch( | 802 bool disabled = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 796 switches::kDisableES3APIs); | 803 switches::kDisableES3APIs); |
| 797 gpu_preferences->enable_es3_apis = (enabled || !blacklisted) && !disabled; | 804 gpu_preferences->enable_es3_apis = (enabled || !blacklisted) && !disabled; |
| 798 } | 805 } |
| 799 | 806 |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1338 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1332 #if defined(OS_WIN) | 1339 #if defined(OS_WIN) |
| 1333 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1340 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1334 #endif | 1341 #endif |
| 1335 complete_gpu_info_already_requested_ = true; | 1342 complete_gpu_info_already_requested_ = true; |
| 1336 // Some observers might be waiting. | 1343 // Some observers might be waiting. |
| 1337 NotifyGpuInfoUpdate(); | 1344 NotifyGpuInfoUpdate(); |
| 1338 } | 1345 } |
| 1339 | 1346 |
| 1340 } // namespace content | 1347 } // namespace content |
| OLD | NEW |