summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-12 05:47:41 +0000
committerposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-12 05:49:42 +0000
commit3b5576fb13f6a285f9626899cab9a9d5ffb65e20 (patch)
tree3b9ea18b2268770ff24332487038f3b502fb26a8 /content
parentd4ed7c5fc19722d8e3fda99a0c69022f41717681 (diff)
downloadchromium_src-3b5576fb13f6a285f9626899cab9a9d5ffb65e20.zip
chromium_src-3b5576fb13f6a285f9626899cab9a9d5ffb65e20.tar.gz
chromium_src-3b5576fb13f6a285f9626899cab9a9d5ffb65e20.tar.bz2
VAVEA: Turn VAAPI encoder flag into a kill switch.
Flip the flag to enable VAVEA by default. Also update the CastStreamingApiTest to not require VP8, as we may be using H264 as well, but just assert on non-empty string for the codec. Do the same for the audio codec while we are here. TEST=encoding scenarios BUG=378962,398322 Review URL: https://codereview.chromium.org/374553002 Cr-Commit-Position: refs/heads/master@{#288920} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/gpu/gpu_process_host.cc2
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc2
-rw-r--r--content/common/gpu/media/gpu_video_encode_accelerator.cc2
-rw-r--r--content/common/gpu/media/vaapi_video_encode_accelerator.cc2
-rw-r--r--content/common/sandbox_linux/bpf_gpu_policy_linux.cc2
-rw-r--r--content/public/common/content_switches.cc4
-rw-r--r--content/public/common/content_switches.h2
7 files changed, 8 insertions, 8 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index db55c30..ae28408 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -884,7 +884,7 @@ bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id) {
switches::kEnableLogging,
switches::kEnableShareGroupAsyncTextureUpload,
#if defined(OS_CHROMEOS)
- switches::kEnableVaapiAcceleratedVideoEncode,
+ switches::kDisableVaapiAcceleratedVideoEncode,
#endif
switches::kGpuStartupDialog,
switches::kGpuSandboxAllowSysVShm,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index e230b1e..2ef3f66 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1257,7 +1257,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableDirectWrite,
#endif
#if defined(OS_CHROMEOS)
- switches::kEnableVaapiAcceleratedVideoEncode,
+ switches::kDisableVaapiAcceleratedVideoEncode,
#endif
};
renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
index 8c12967..099c456 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
@@ -192,7 +192,7 @@ void GpuVideoEncodeAccelerator::CreateEncoder() {
encoder_.reset(new V4L2VideoEncodeAccelerator(device.Pass()));
#elif defined(ARCH_CPU_X86_FAMILY)
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
- if (cmd_line->HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode))
+ if (!cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
encoder_.reset(new VaapiVideoEncodeAccelerator(gfx::GetXDisplay()));
#endif
#elif defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
index 32f9f4f..022bec9 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -110,7 +110,7 @@ VaapiVideoEncodeAccelerator::GetSupportedProfiles() {
std::vector<SupportedProfile> profiles;
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
- if (!cmd_line->HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode))
+ if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
return profiles;
SupportedProfile profile;
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index 673e59d..71efae7 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -78,7 +78,7 @@ bool IsAcceleratedVideoEnabled() {
bool accelerated_encode_enabled = false;
#if defined(OS_CHROMEOS)
accelerated_encode_enabled =
- command_line.HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode);
+ !command_line.HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
#endif
return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode) ||
accelerated_encode_enabled;
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 1144516..a46ada7 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -916,8 +916,8 @@ const char kDisableWebAudio[] = "disable-webaudio";
const char kDisablePanelFitting[] = "disable-panel-fitting";
// Enables VA-API accelerated video encode.
-const char kEnableVaapiAcceleratedVideoEncode[] =
- "enable-vaapi-accelerated-video-encode";
+const char kDisableVaapiAcceleratedVideoEncode[] =
+ "disable-vaapi-accelerated-video-encode";
#endif
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 908e544..be86c29 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -263,7 +263,7 @@ CONTENT_EXPORT extern const char kDisableWebAudio[];
#if defined(OS_CHROMEOS)
CONTENT_EXPORT extern const char kDisablePanelFitting[];
-CONTENT_EXPORT extern const char kEnableVaapiAcceleratedVideoEncode[];
+CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
#endif
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)