summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2015-07-20 17:49:02 -0700
committerDale Curtis <dalecurtis@chromium.org>2015-07-21 00:50:02 +0000
commit79727c6ca7b0401c9cc2e824eaa354a3fb9862f9 (patch)
tree70f6e44115378ef0de3f0aa94f2cd95d03abfad1
parent25cd81775bbb953330d2975b82d4ef5237ed1c2a (diff)
downloadchromium_src-79727c6ca7b0401c9cc2e824eaa354a3fb9862f9.zip
chromium_src-79727c6ca7b0401c9cc2e824eaa354a3fb9862f9.tar.gz
chromium_src-79727c6ca7b0401c9cc2e824eaa354a3fb9862f9.tar.bz2
Merge to M44: "Put windows vpx hardware decode behind a flag."
Appears broken for many users, so this is not ready to be on by default. BUG=499696 TEST=compile TBR=ananta,nick Review URL: https://codereview.chromium.org/1223073003 Cr-Commit-Position: refs/heads/master@{#339180} (cherry picked from commit 628f0c1e9e7faef3bf3acf573aac5cdc82d87261) Review URL: https://codereview.chromium.org/1243943002 . Cr-Commit-Position: refs/branch-heads/2403@{#538} Cr-Branched-From: f54b8097a9c45ed4ad308133d49f05325d6c5070-refs/heads/master@{#330231}
-rw-r--r--content/browser/gpu/gpu_process_host.cc3
-rw-r--r--content/common/gpu/media/dxva_video_decode_accelerator.cc7
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h3
4 files changed, 13 insertions, 3 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 5ad5340..9c72997 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -87,6 +87,9 @@ static const char* const kSwitchNames[] = {
#if defined(ENABLE_WEBRTC)
switches::kDisableWebRtcHWEncoding,
#endif
+#if defined(OS_WIN)
+ switches::kEnableAcceleratedVpxDecode,
+#endif
switches::kEnableLogging,
switches::kEnableShareGroupAsyncTextureUpload,
#if defined(OS_CHROMEOS)
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc
index 628bccd0..98947ce 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc
@@ -29,6 +29,7 @@
#include "base/path_service.h"
#include "base/trace_event/trace_event.h"
#include "base/win/windows_version.h"
+#include "content/public/common/content_switches.h"
#include "media/video/video_decode_accelerator.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
@@ -968,8 +969,10 @@ bool DXVAVideoDecodeAccelerator::InitDecoder(media::VideoCodecProfile profile) {
"blacklisted version of msmpeg2vdec.dll 6.7.7140",
false);
codec_ = media::kCodecH264;
- } else if (profile == media::VP8PROFILE_ANY ||
- profile == media::VP9PROFILE_ANY) {
+ } else if ((profile == media::VP8PROFILE_ANY ||
+ profile == media::VP9PROFILE_ANY) &&
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAcceleratedVpxDecode)) {
int program_files_key = base::DIR_PROGRAM_FILES;
if (base::win::OSInfo::GetInstance()->wow64_status() ==
base::win::OSInfo::WOW64_ENABLED) {
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index bc896da..7036d26 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -994,6 +994,9 @@ const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
const char kDisableWin32kRendererLockDown[] =
"disable-win32k-renderer-lockdown";
+// Enables experimental hardware acceleration for VP8/VP9 video decoding.
+const char kEnableAcceleratedVpxDecode[] = "enable-accelerated-vpx-decode";
+
// DirectWrite FontCache is shared by browser to renderers using shared memory.
// This switch allows us to pass the shared memory handle to the renderer.
const char kFontCacheSharedHandle[] = "font-cache-shared-handle";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index c27bee8..f49c4cc 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -293,9 +293,10 @@ extern const char kDisableThreadedEventHandlingMac[];
CONTENT_EXPORT extern const char kDeviceScaleFactor[];
CONTENT_EXPORT extern const char kDisableLegacyIntermediateWindow[];
CONTENT_EXPORT extern const char kDisableWin32kRendererLockDown[];
-CONTENT_EXPORT extern const char kMemoryPressureThresholdsMb[];
+CONTENT_EXPORT extern const char kEnableAcceleratedVpxDecode[];
// Switch to pass the font cache shared memory handle to the renderer.
CONTENT_EXPORT extern const char kFontCacheSharedHandle[];
+CONTENT_EXPORT extern const char kMemoryPressureThresholdsMb[];
CONTENT_EXPORT extern const char kTraceExportEventsToETW[];
#endif