summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 02:20:12 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 02:20:12 +0000
commit13325c744ae97ee00f24e3cff1819084ab5c15ec (patch)
tree561f42332ea7f60e1cb8cc4ef3b40871651a9fd7 /app
parent7c902759fdbc92e02b5ed86004a89f68f1358246 (diff)
downloadchromium_src-13325c744ae97ee00f24e3cff1819084ab5c15ec.zip
chromium_src-13325c744ae97ee00f24e3cff1819084ab5c15ec.tar.gz
chromium_src-13325c744ae97ee00f24e3cff1819084ab5c15ec.tar.bz2
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 Review URL: http://codereview.chromium.org/6674011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/gfx/gl/gl_context_egl.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/app/gfx/gl/gl_context_egl.cc b/app/gfx/gl/gl_context_egl.cc
index a367cd8..e68e1d3 100644
--- a/app/gfx/gl/gl_context_egl.cc
+++ b/app/gfx/gl/gl_context_egl.cc
@@ -2,11 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <d3d11.h>
+#include <d3dcompiler.h>
+
#include "app/gfx/gl/gl_context_egl.h"
-#include "build/build_config.h"
+#include "base/file_path.h"
#include "base/logging.h"
+#include "base/native_library.h"
+#include "base/path_service.h"
#include "base/scoped_ptr.h"
+#include "build/build_config.h"
#include "third_party/angle/include/EGL/egl.h"
// This header must come after the above third-party include, as
@@ -90,6 +96,15 @@ bool BaseEGLContext::InitializeOneOff() {
#else
EGLNativeDisplayType native_display = EGL_DEFAULT_DISPLAY;
#endif
+
+#ifdef 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();