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

Unified Diff: content/gpu/gpu_main.cc

Issue 1173193002: Don't peek messages in the MessagePumpForUI class when we receive our kMsgHaveWork message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « base/message_loop/message_pump_win.cc ('k') | 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
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index c6a59fc9c19c745e8eb5ad78dab52603d61b279b..71e493bc7b82a5e4b876f0cea9c301d9c32eebd8 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -160,9 +160,22 @@ int GpuMain(const MainFunctionParams& parameters) {
bool dead_on_arrival = false;
#if defined(OS_WIN)
+ base::MessageLoop::Type loop_type = base::MessageLoop::TYPE_IO;
// Use a UI message loop because ANGLE and the desktop GL platform can
// create child windows to render to.
- base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
+ // TODO(ananta) : Recent changes to the UI message pump class on Windows
+ // will cause delays in tasks getting processed in the GPU process which
+ // will show up on the bots in webgl conformance tests, perf tests etc.
+ // It will be great if we can work around the issues with desktop GL and
+ // avoid creating a child window in the GPU process which requires a UI
+ // message pump.
+ if ((command_line.HasSwitch(switches::kUseGL) &&
+ command_line.GetSwitchValueASCII(switches::kUseGL) == "desktop") ||
+ (command_line.HasSwitch(switches::kUseANGLE) &&
+ command_line.GetSwitchValueASCII(switches::kUseANGLE) == "gl")) {
+ loop_type = base::MessageLoop::TYPE_UI;
+ }
+ base::MessageLoop main_message_loop(loop_type);
#elif defined(OS_LINUX) && defined(USE_X11)
// We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
// and https://crbug.com/326995.
« no previous file with comments | « base/message_loop/message_pump_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698