Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: content/gpu/gpu_main.cc

Issue 7566024: Instantiate MessageLoop earlier during GPU process startup on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
===================================================================
--- content/gpu/gpu_main.cc (revision 95355)
+++ content/gpu/gpu_main.cc (working copy)
@@ -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 @@
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)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698