summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin/ppapi_thread.cc
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 12:38:17 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 12:38:17 +0000
commit4375ae01768ce1032f0f6345da5c26f2934a3d77 (patch)
treec8d3dfe4f35e1ee1a5f60649ac2d1402695869ce /content/ppapi_plugin/ppapi_thread.cc
parentb89c2a896e95276a9563e61f615c5d85ca7aecfe (diff)
downloadchromium_src-4375ae01768ce1032f0f6345da5c26f2934a3d77.zip
chromium_src-4375ae01768ce1032f0f6345da5c26f2934a3d77.tar.gz
chromium_src-4375ae01768ce1032f0f6345da5c26f2934a3d77.tar.bz2
Preload dxva2.dll on Windows when loading Widevine CDM adapter.
BUG=395147 TEST=To be tested on win build. Review URL: https://codereview.chromium.org/407333003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin/ppapi_thread.cc')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 2d5e3db..62cf021 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -54,6 +54,8 @@
#endif
#if defined(OS_WIN)
+const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll";
+
extern sandbox::TargetServices* g_target_services;
// Used by EnumSystemLocales for warming up.
@@ -326,13 +328,16 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
// can be loaded. TODO(cpu): consider changing to the loading style of
// regular plugins.
if (g_target_services) {
- // Let Flash load DXVA before lockdown on Vista+.
- if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
+ // Let Flash and Widevine CDM adapter load DXVA before lockdown on Vista+.
+ if (permissions.HasPermission(ppapi::PERMISSION_FLASH) ||
+ path.BaseName().MaybeAsASCII() == kWidevineCdmAdapterFileName) {
if (base::win::OSInfo::GetInstance()->version() >=
base::win::VERSION_VISTA) {
LoadLibraryA("dxva2.dll");
}
+ }
+ if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
if (base::win::OSInfo::GetInstance()->version() >=
base::win::VERSION_WIN7) {
base::CPU cpu;