summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 14:11:34 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 14:11:34 +0000
commit57b5d7dc1cf3ddd037dc9dd6c6d6fe415f6724dc (patch)
tree02b346efa9e437cdb6a7326dbc284bd3ee9eac07 /chrome
parentaf47c8ccfc81d88575f214c6d9da70e669fb4791 (diff)
downloadchromium_src-57b5d7dc1cf3ddd037dc9dd6c6d6fe415f6724dc.zip
chromium_src-57b5d7dc1cf3ddd037dc9dd6c6d6fe415f6724dc.tar.gz
chromium_src-57b5d7dc1cf3ddd037dc9dd6c6d6fe415f6724dc.tar.bz2
GPU process does not rely on GTK.
AFAIK, the GPU process does not rely on GTK. This patch eliminates the initialization of GTK. BUG=none TEST=try bots and by hand on Linux with 3D CSS and WebGL content Review URL: http://codereview.chromium.org/6596074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/gpu/gpu_main.cc26
1 files changed, 11 insertions, 15 deletions
diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc
index 4a9dae3..1de26e0 100644
--- a/chrome/gpu/gpu_main.cc
+++ b/chrome/gpu/gpu_main.cc
@@ -31,7 +31,7 @@
#endif
#if defined(USE_X11)
-#include "ui/gfx/gtk_util.h"
+#include "ui/base/x/x11_util.h"
#endif
// Main function for starting the Gpu process.
@@ -55,25 +55,21 @@ int GpuMain(const MainFunctionParams& parameters) {
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
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);
+ // 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
+ }
app::win::ScopedCOMInitializer com_initializer;
-#if defined(USE_X11)
- // The X11 port of the command buffer code assumes it can access the X
- // display via the macro GDK_DISPLAY(), which implies that Gtk has been
- // initialized. This code was taken from PluginThread. TODO(kbr):
- // rethink whether initializing Gtk is really necessary or whether we
- // should just send a raw display connection down to the GPUProcessor.
- g_thread_init(NULL);
- gfx::GtkInitFromCommandLine(command_line);
-#endif
-
// We can not tolerate early returns from this code, because the
// detection of early return of a child process is implemented using
// an IPC channel error. If the IPC channel is not fully set up