diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-08 21:53:16 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-08 21:53:16 +0000 |
commit | d2a6c0e39c322c14633d491dbe98e0f923508a04 (patch) | |
tree | 197ef9c4900bbfae0bdcff7068a0f4c691b76839 /content/gpu/gpu_main.cc | |
parent | fe920c899a2869a82824b7f20c19797b0fa8bed1 (diff) | |
download | chromium_src-d2a6c0e39c322c14633d491dbe98e0f923508a04.zip chromium_src-d2a6c0e39c322c14633d491dbe98e0f923508a04.tar.gz chromium_src-d2a6c0e39c322c14633d491dbe98e0f923508a04.tar.bz2 |
Instantiate MessageLoop earlier during GPU process startup on Windows
to try to warm up necessary window creation.
BUG=91452
TEST=none
Review URL: http://codereview.chromium.org/7566024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu/gpu_main.cc')
-rw-r--r-- | content/gpu/gpu_main.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index 68aff9b..398bb6d 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -20,6 +20,7 @@ #include "content/gpu/gpu_child_thread.h" #include "content/gpu/gpu_process.h" #include "ui/gfx/gl/gl_surface.h" +#include "ui/gfx/gl/gl_switches.h" #if defined(OS_MACOSX) #include "content/common/chrome_application_mac.h" @@ -73,7 +74,20 @@ int GpuMain(const MainFunctionParams& parameters) { chrome_application_mac::RegisterCrApp(); #endif - MessageLoop main_message_loop(MessageLoop::TYPE_UI); + MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI; +#if defined(OS_WIN) + // Unless we're running on desktop GL, we don't need a UI message + // loop, so avoid its use to work around apparent problems with some + // third-party software. + message_loop_type = MessageLoop::TYPE_IO; + if (command_line.HasSwitch(switches::kUseGL) && + command_line.GetSwitchValueASCII(switches::kUseGL) == + gfx::kGLImplementationDesktopName) { + message_loop_type = MessageLoop::TYPE_UI; + } +#endif + + MessageLoop main_message_loop(message_loop_type); base::PlatformThread::SetName("CrGpuMain"); if (!command_line.HasSwitch(switches::kSingleProcess)) { |