Chromium Code Reviews| Index: ui/gl/gl_surface_egl.cc |
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
| index 9fb5082ebcf33221d19fc2785222294c8de13141..4b08afdf495b1223cae1f748b8336045a81e876b 100644 |
| --- a/ui/gl/gl_surface_egl.cc |
| +++ b/ui/gl/gl_surface_egl.cc |
| @@ -36,11 +36,7 @@ |
| #endif |
| #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| -extern "C" { |
| -#include <X11/Xlib.h> |
| -#define Status int |
| -} |
| -#include "ui/gfx/x/x11_switches.h" // nogncheck |
| +#include "ui/gl/gl_visual_picker_glx.h" |
|
piman
2016/09/22 21:24:55
When we're using EGL, we are not using GLX, so I d
Tom (Use chromium acct)
2016/09/23 20:00:37
Done. I opted to use XVisualManager instead. Unf
piman
2016/09/26 21:13:29
I think this is ok.
|
| #endif |
| #if !defined(EGL_FIXED_SIZE_ANGLE) |
| @@ -175,14 +171,9 @@ EGLDisplay GetPlatformANGLEDisplay(EGLNativeDisplayType native_display, |
| } |
| #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| - 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)visualid); |
| + display_attribs.push_back( |
| + (EGLint)gl::GLVisualPickerGLX::GetInstance()->rgba_visual().visualid); |
|
piman
2016/09/22 21:24:55
nit: static_cast instead of c-style casts.
Tom (Use chromium acct)
2016/09/23 20:00:37
Done.
|
| #endif |
| display_attribs.push_back(EGL_NONE); |
| @@ -274,17 +265,8 @@ EGLConfig ChooseConfig(GLSurface::Format format) { |
| EGLint alpha_size = 8; |
| #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kWindowDepth)) { |
| - std::string depth = |
| - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| - switches::kWindowDepth); |
| - |
| - bool succeed = base::StringToInt(depth, &buffer_size); |
| - DCHECK(succeed); |
| - |
| - alpha_size = buffer_size == 32 ? 8 : 0; |
| - } |
| + buffer_size = gl::GLVisualPickerGLX::GetInstance()->rgba_visual().depth; |
| + alpha_size = buffer_size == 32 ? 8 : 0; |
| #endif |
| EGLint surface_type = (format == GLSurface::SURFACE_SURFACELESS) |