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

Unified Diff: content/gpu/gpu_main.cc

Issue 2629983002: Fix the MessageLoop type in case more than one ozone platform is built (Closed)
Patch Set: added a comment explain the static method Created 3 years, 11 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
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 2518e539bc8a55102c91f54d86345cf8403be521..1d208bc92a0db7a19e28b9d32fa2d8671a1f935c 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -47,6 +47,7 @@
#include "ui/gl/gl_switches.h"
#include "ui/gl/gpu_switching_manager.h"
#include "ui/gl/init/gl_factory.h"
+#include "ui/ozone/public/ozone_platform.h"
#if defined(OS_WIN)
#include <windows.h>
@@ -217,13 +218,9 @@ int GpuMain(const MainFunctionParams& parameters) {
// and https://crbug.com/326995.
main_message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
event_source = ui::PlatformEventSource::CreateDefault();
-#elif defined(USE_OZONE) && defined(OZONE_X11)
- // If we might be running Ozone X11 we need a UI loop to grab Expose events.
- // See GLSurfaceGLX and https://crbug.com/326995.
- main_message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
#elif defined(USE_OZONE)
main_message_loop.reset(
- new base::MessageLoop(base::MessageLoop::TYPE_DEFAULT));
+ new base::MessageLoop(ui::OzonePlatform::GetMessageLoopType()));
sadrul 2017/01/31 17:12:36 Is there a reason to not always use TYPE_UI here?
#elif defined(OS_LINUX)
#error "Unsupported Linux platform."
#elif defined(OS_MACOSX)

Powered by Google App Engine
This is Rietveld 408576698