Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index 0dc52fcaf88e98e2dcf3b4a4858b357f8210f0ad..a98d473909cd25dc15d6e3ac7cdc5bda2f40d8e2 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -61,7 +61,6 @@ |
| #include "content/browser/gpu/compositor_util.h" |
| #include "content/browser/gpu/gpu_data_manager_impl.h" |
| #include "content/browser/gpu/gpu_process_host.h" |
| -#include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| #include "content/browser/gpu/shader_cache_factory.h" |
| #include "content/browser/histogram_synchronizer.h" |
| #include "content/browser/leveldb_wrapper_impl.h" |
| @@ -119,6 +118,11 @@ |
| #include "ui/aura/env.h" |
| #endif |
| +#if defined(USE_OZONE) |
| +#include "ui/ozone/public/gpu_platform_support_host.h" |
| +#include "ui/ozone/public/ozone_platform.h" |
| +#endif |
| + |
| #if defined(OS_ANDROID) |
| #include "base/android/jni_android.h" |
| #include "components/tracing/common/graphics_memory_dump_provider_android.h" |
| @@ -646,6 +650,15 @@ void BrowserMainLoop::MainMessageLoopStart() { |
| main_message_loop_.reset(new base::MessageLoopForUI); |
| InitializeMainThread(); |
| +#if defined(USE_OZONE) |
| + DCHECK(env_); |
| + if (env_->mode() == aura::Env::Mode::LOCAL) { |
| + DCHECK(ui::OzonePlatform::GetInstance()); |
| + ui::OzonePlatform::GetInstance() |
| + ->GetGpuPlatformSupportHost() |
| + ->BindToCurrentThread(); |
|
jam
2017/04/20 00:22:20
why not just pass in the UI thread's task runner i
sadrul
2017/04/20 03:10:31
Yep, that also works. Done.
|
| + } |
| +#endif |
| } |
| void BrowserMainLoop::PostMainMessageLoopStart() { |