summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 02:29:52 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 02:29:52 +0000
commit1d124d66343f85bdb54e3cf3fc4ce44ffb2e7cf7 (patch)
tree79749b7e06a60aa57a2c9e13030207e63b7e33da /app
parentbbf16d96957d29eb006b2081dedb6f0a0b5db960 (diff)
downloadchromium_src-1d124d66343f85bdb54e3cf3fc4ce44ffb2e7cf7.zip
chromium_src-1d124d66343f85bdb54e3cf3fc4ce44ffb2e7cf7.tar.gz
chromium_src-1d124d66343f85bdb54e3cf3fc4ce44ffb2e7cf7.tar.bz2
Reland 77766
Preload D3DCompiler_42.dll. This needs to be loaded before the sandbox is turned on. TEST=The DLL is not loaded after initialization BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/gfx/gl/gl_context_egl.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/gfx/gl/gl_context_egl.cc b/app/gfx/gl/gl_context_egl.cc
index a367cd8..b899759 100644
--- a/app/gfx/gl/gl_context_egl.cc
+++ b/app/gfx/gl/gl_context_egl.cc
@@ -13,6 +13,11 @@
// it brings in #defines that cause conflicts.
#include "app/gfx/gl/gl_bindings.h"
+#if defined(OS_WIN)
+#include <d3d11.h>
+#include <d3dcompiler.h>
+#endif
+
#if defined(OS_LINUX)
extern "C" {
#include <X11/Xlib.h>
@@ -90,6 +95,15 @@ bool BaseEGLContext::InitializeOneOff() {
#else
EGLNativeDisplayType native_display = EGL_DEFAULT_DISPLAY;
#endif
+
+#if defined(OS_WIN)
+ FilePath module_path;
+ if (!PathService::Get(base::DIR_MODULE, &module_path))
+ return false;
+
+ base::LoadNativeLibrary(module_path.Append(D3DCOMPILER_DLL));
+#endif
+
g_display = eglGetDisplay(native_display);
if (!g_display) {
LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString();