Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2573933002: Restore switch kDisableWebRtcHWEncoding (Closed)
Patch Set: renew comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 83ef7cac45db21659575c4acf55ac4562c748e8d..df629d2add9f13ca1aa48c5efade8df41684e489 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -777,16 +777,23 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
#endif
#if BUILDFLAG(ENABLE_WEBRTC)
- if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) &&
- !command_line->HasSwitch(switches::kDisableWebRtcHWVP8Encoding) &&
- !base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding)) {
- if (gpu_preferences) {
+if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE)) {
+#if defined (OS_ANDROID)
+ // On Android HW H264 is enabled by default behind a flag now, regardless of
+ // the blacklist. Disable HW encoding if every single HW codec is disabled.
+ // TODO(braveyao): remove this once the blacklist is removed
+ // (crbug.com/638664).
+ if (!base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding)) {
+#endif
+ if (!command_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
+ command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding);
+ if (gpu_preferences)
gpu_preferences->disable_web_rtc_hw_encoding = true;
- } else {
- command_line->AppendSwitch(switches::kDisableWebRtcHWVP8Encoding);
- }
+#if defined (OS_ANDROID)
}
#endif
+}
+#endif
if (gpu_preferences) { // enable_es3_apis
bool blacklisted = IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL2);
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698