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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 1984323005: Pass switches::kX11VisualID and use it from gl_surface_egl.cc::GetPlatformANGLEDisplay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebase Created 4 years, 7 months 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 | « ui/gfx/x/x11_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ui/gfx/x/x11_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698