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 559f00ff8e3812b91e88ca2140b6c9d8b461c159..2862ec1837d6c23ddfc0a30916e5d91bdaaa643f 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -877,18 +877,19 @@ int BrowserMainLoop::PreCreateThreads() { |
| ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); |
| #endif |
| + GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| + |
| +#if defined(USE_X11) && !defined(OS_CHROMEOS) |
| + gpu_data_manager_visual_proxy_.reset( |
| + new internal::GpuDataManagerVisualProxy(gpu_data_manager)); |
|
piman
2017/05/18 22:55:05
nit: maybe add a comment explaining that it's safe
Tom Anderson
2017/05/18 23:36:51
Done.
|
| +#endif |
| + |
| // 1) Need to initialize in-process GpuDataManager before creating threads. |
| // It's unsafe to append the gpu command line switches to the global |
| // CommandLine::ForCurrentProcess object after threads are created. |
| // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. |
| - GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| gpu_data_manager->Initialize(); |
| -#if defined(USE_X11) && !defined(OS_CHROMEOS) |
| - gpu_data_manager_visual_proxy_.reset( |
| - new internal::GpuDataManagerVisualProxy(gpu_data_manager)); |
| -#endif |
| - |
| #if !defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID) |
| // Single-process is an unsupported and not fully tested mode, so |
| // don't enable it for official Chrome builds (except on Android). |