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 7c36984843a7eadbf12da2bf7c3ec969542a492e..705cd1a0e982fc36803d8c4bac433c9911adbcb4 100644 |
| --- a/ui/gl/gl_surface_egl.cc |
| +++ b/ui/gl/gl_surface_egl.cc |
| @@ -35,6 +35,10 @@ extern "C" { |
| #include "ui/ozone/public/surface_factory_ozone.h" |
| #endif |
| +#if defined(USE_X11) && !defined(OS_CHROMEOS) |
| +#include "ui/gfx/x/x11_switches.h" |
| +#endif |
| + |
| #if !defined(EGL_FIXED_SIZE_ANGLE) |
| #define EGL_FIXED_SIZE_ANGLE 0x3201 |
| #endif |
| @@ -288,6 +292,20 @@ bool GLSurfaceEGL::InitializeOneOff() { |
| const EGLint* config_attribs = ui::OzonePlatform::GetInstance() |
| ->GetSurfaceFactoryOzone() |
| ->GetEGLSurfaceProperties(kConfigAttribs); |
| +#elif defined(USE_X11) && !defined(OS_CHROMEOS) |
| + const EGLint* config_attribs = kConfigAttribs; |
| + |
| + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableTransparentVisuals)) { |
| + const int kBufferSizeOffset = 1; |
| + const int kAlphaSizeOffset = 3; |
| + EGLint* config_non_const = const_cast<EGLint*>(kConfigAttribs); |
|
hendrikw
2015/11/11 23:55:46
Not a big fan of this const stuff.
How about abov
Julien Isorce Samsung
2015/11/12 11:06:48
Much easier to read indeed, thx. I addressed remar
|
| + |
| + config_non_const[kBufferSizeOffset] = 24; |
| + config_non_const[kAlphaSizeOffset] = 0; |
| + |
| + config_attribs = config_non_const; |
| + } |
| #else |
| const EGLint* config_attribs = kConfigAttribs; |
| #endif |