Chromium Code Reviews| 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..313e2568c3ec36bf4a9251da6e0beb5e7993f5e0 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,6 +55,12 @@ GpuMain::GpuMain(mojom::GpuMainRequest request) |
| #elif defined(USE_X11) |
| thread_options.message_pump_factory = base::Bind(&CreateMessagePumpX11); |
| #elif defined(USE_OZONE) |
| + // 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?
|
| + // depending on the runtime platform selection. |
| + ui::OzonePlatform::CreateInstance(); |
| + thread_options.message_loop_type = |
| + ui::OzonePlatform::GetInstance()->GetMessageLoopTypeForGpu(); |
| thread_options.message_loop_type = base::MessageLoop::TYPE_UI; |
|
kylechar
2017/02/07 17:41:47
I think this line was supposed to be deleted?
tonikitoo
2017/02/07 19:36:41
my fault. let it pass doing 'git add -p'.
Fixed.
|
| #elif defined(OS_LINUX) |
| thread_options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; |