Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index c7053b2316a15f76d3197ae03977d2cb76601c88..4ec7f5c27ce5f7c441580e81e71d16fb60bb712a 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -176,10 +176,14 @@ EGLDisplay GetPlatformANGLEDisplay(EGLNativeDisplayType native_display, |
} |
#if defined(USE_X11) && !defined(OS_CHROMEOS) |
- Visual* visual; |
- ui::ChooseVisualForWindow(&visual, nullptr); |
+ std::string visualid_str = |
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
+ switches::kX11VisualID); |
+ unsigned int visualid = 0; |
+ bool succeed = base::StringToUint(visualid_str, &visualid); |
+ DCHECK(succeed); |
display_attribs.push_back(EGL_X11_VISUAL_ID_ANGLE); |
- display_attribs.push_back((EGLint)visual->visualid); |
+ display_attribs.push_back((EGLint)visualid); |
#endif |
display_attribs.push_back(EGL_NONE); |