summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 01:42:39 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 01:42:39 +0000
commit23f4656795c66df22e9c8157117a19364ea38cdd (patch)
tree8dc19289f388e5ca116885a5015b58e65a8175c6 /content/gpu
parent1629811b5dfecd03a2f3c26a67ef44e5fa7c4e40 (diff)
downloadchromium_src-23f4656795c66df22e9c8157117a19364ea38cdd.zip
chromium_src-23f4656795c66df22e9c8157117a19364ea38cdd.tar.gz
chromium_src-23f4656795c66df22e9c8157117a19364ea38cdd.tar.bz2
Preload D3DX DLLs before ANGLE is loaded.
This is in case they are not in the DLL search path. It tries the default search path first in case D3DX is installed in the regular place. If that fails then it uses an absolute path to where Chrome installs them. I moved the call to SetErrorMode to be before ANGLE is loaded. Without this, a failing call to LoadLibrary would result in the display of a dialog box. This is dependent on http://codereview.chromium.org/7831021. BUG=69610 Review URL: http://codereview.chromium.org/7792078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_main.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 79ca7c4..198af14 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -41,6 +41,19 @@ int GpuMain(const MainFunctionParams& parameters) {
ChildProcess::WaitForDebugger("Gpu");
}
+ if (!command_line.HasSwitch(switches::kSingleProcess)) {
+#if defined(OS_WIN)
+ // Prevent Windows from displaying a modal dialog on failures like not being
+ // able to load a DLL.
+ SetErrorMode(
+ SEM_FAILCRITICALERRORS |
+ SEM_NOGPFAULTERRORBOX |
+ SEM_NOOPENFILEERRORBOX);
+#elif defined(USE_X11)
+ ui::SetDefaultX11ErrorHandlers();
+#endif
+ }
+
// Initialization of the OpenGL bindings may fail, in which case we
// will need to tear down this process. However, we can not do so
// safely until the IPC channel is set up, because the detection of
@@ -92,19 +105,6 @@ int GpuMain(const MainFunctionParams& parameters) {
MessageLoop main_message_loop(message_loop_type);
base::PlatformThread::SetName("CrGpuMain");
- if (!command_line.HasSwitch(switches::kSingleProcess)) {
-#if defined(OS_WIN)
- // Prevent Windows from displaying a modal dialog on failures like not being
- // able to load a DLL.
- SetErrorMode(
- SEM_FAILCRITICALERRORS |
- SEM_NOGPFAULTERRORBOX |
- SEM_NOOPENFILEERRORBOX);
-#elif defined(USE_X11)
- ui::SetDefaultX11ErrorHandlers();
-#endif
- }
-
GpuProcess gpu_process;
GpuChildThread* child_thread = new GpuChildThread(dead_on_arrival);