Commit d2a6c0e3 authored by kbr@chromium.org's avatar kbr@chromium.org

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
parent fe920c89
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "content/gpu/gpu_child_thread.h" #include "content/gpu/gpu_child_thread.h"
#include "content/gpu/gpu_process.h" #include "content/gpu/gpu_process.h"
#include "ui/gfx/gl/gl_surface.h" #include "ui/gfx/gl/gl_surface.h"
#include "ui/gfx/gl/gl_switches.h"
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "content/common/chrome_application_mac.h" #include "content/common/chrome_application_mac.h"
...@@ -73,7 +74,20 @@ int GpuMain(const MainFunctionParams& parameters) { ...@@ -73,7 +74,20 @@ int GpuMain(const MainFunctionParams& parameters) {
chrome_application_mac::RegisterCrApp(); chrome_application_mac::RegisterCrApp();
#endif #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"); base::PlatformThread::SetName("CrGpuMain");
if (!command_line.HasSwitch(switches::kSingleProcess)) { if (!command_line.HasSwitch(switches::kSingleProcess)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment