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

Unified Diff: services/ui/gpu/gpu_main.cc

Issue 2629983002: Fix the MessageLoop type in case more than one ozone platform is built (Closed)
Patch Set: addressed kbr's feedback Created 3 years, 10 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 | « content/gpu/gpu_main.cc ('k') | ui/ozone/platform/x11/ozone_platform_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gpu/gpu_main.cc
diff --git a/services/ui/gpu/gpu_main.cc b/services/ui/gpu/gpu_main.cc
index a87c7cbe39cdfe1054435e7b8eae149a32dd706b..fe89372b2550a0ad56d0a39c619c58db454fed9c 100644
--- a/services/ui/gpu/gpu_main.cc
+++ b/services/ui/gpu/gpu_main.cc
@@ -14,6 +14,10 @@
#include "services/ui/common/server_gpu_memory_buffer_manager.h"
#include "services/ui/gpu/gpu_service.h"
+#if defined(USE_OZONE)
+#include "ui/ozone/public/ozone_platform.h"
+#endif
+
#if defined(OS_MACOSX)
#include "base/message_loop/message_pump_mac.h"
#endif
@@ -51,7 +55,10 @@ GpuMain::GpuMain(mojom::GpuMainRequest request)
#elif defined(USE_X11)
thread_options.message_pump_factory = base::Bind(&CreateMessagePumpX11);
#elif defined(USE_OZONE)
- thread_options.message_loop_type = base::MessageLoop::TYPE_UI;
+ // The MessageLoop type required depends on the Ozone platform selected at
+ // runtime.
+ thread_options.message_loop_type =
+ ui::OzonePlatform::EnsureInstance()->GetMessageLoopTypeForGpu();
#elif defined(OS_LINUX)
thread_options.message_loop_type = base::MessageLoop::TYPE_DEFAULT;
#elif defined(OS_MACOSX)
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | ui/ozone/platform/x11/ozone_platform_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698