| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index 57a74fc2f27a0de3c01b9b7f845bf0d08ce0d672..8f93e6776a575a5a532d7e4e7d6403f81c95c7d7 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -162,7 +162,9 @@
|
| #endif
|
|
|
| #if defined(USE_X11)
|
| +#include "ui/base/x/x11_util_internal.h"
|
| #include "ui/gfx/x/x11_connection.h"
|
| +#include "ui/gfx/x/x11_switches.h"
|
| #include "ui/gfx/x/x11_types.h"
|
| #endif
|
|
|
| @@ -1374,6 +1376,17 @@ bool BrowserMainLoop::InitializeToolkit() {
|
| #if defined(USE_X11)
|
| if (!gfx::GetXDisplay())
|
| return false;
|
| +
|
| +#if !defined(OS_CHROMEOS)
|
| + // InitializeToolkit is called before CreateStartupTasks which one starts the
|
| + // gpu process.
|
| + int depth = 0;
|
| + ui::ChooseVisualForWindow(NULL, &depth);
|
| + DCHECK(depth > 0);
|
| + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
| + switches::kWindowDepth, base::IntToString(depth));
|
| +#endif
|
| +
|
| #endif
|
|
|
| // Env creates the compositor. Aura widgets need the compositor to be created
|
|
|