| 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..d86a7a4b43a142e5f53e6f8faca76d011b487609 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -877,18 +877,21 @@ int BrowserMainLoop::PreCreateThreads() {
|
| ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
|
| #endif
|
|
|
| + GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
|
| +
|
| +#if defined(USE_X11) && !defined(OS_CHROMEOS)
|
| + // GpuDataManagerVisualProxy() just adds itself as an observer of
|
| + // |gpu_data_manager|, which is safe to do before Initialize().
|
| + gpu_data_manager_visual_proxy_.reset(
|
| + new internal::GpuDataManagerVisualProxy(gpu_data_manager));
|
| +#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).
|
|
|