Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: content/browser/browser_main_loop.cc

Issue 1429083002: gl_surface_egl: ensure off and on screen surfaces use the same EGLConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698