Chromium Code Reviews| Index: content/gpu/gpu_main.cc |
| diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc |
| index 54791f60a1c8d8591c74e856c0562fd20a2d0d16..105ada872b9be99bb1e8291c46e60228f59c446c 100644 |
| --- a/content/gpu/gpu_main.cc |
| +++ b/content/gpu/gpu_main.cc |
| @@ -81,6 +81,10 @@ |
| #include "content/common/sandbox_mac.h" |
| #endif |
| +#if defined(USE_OZONE) |
| +#include "ui/ozone/public/ozone_platform.h" |
| +#endif |
| + |
| #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| #include "media/gpu/vaapi_wrapper.h" |
| #endif |
| @@ -218,13 +222,13 @@ 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)); |
| + // Create the OzonePlatform instance without doing any initialization. |
| + // This is needed so that we can inquery a MessageLoopType, which varies |
|
fwang
2017/02/07 17:03:46
inquire?
kylechar
2017/02/07 17:41:46
Maybe replace the last sentence with something lik
tonikitoo
2017/02/07 19:36:41
Done.
|
| + // depending on the runtime platform selection. |
| + ui::OzonePlatform::CreateInstance(); |
| + main_message_loop.reset(new base::MessageLoop( |
| + ui::OzonePlatform::GetInstance()->GetMessageLoopTypeForGpu())); |
| #elif defined(OS_LINUX) |
| #error "Unsupported Linux platform." |
| #elif defined(OS_MACOSX) |