| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index 8c3ed9fa9b876ae50090713841424278b44db784..85cb46dcf82e74ff8b14260131c544365387e4fb 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -33,6 +33,11 @@
|
| #include <android/native_window_jni.h>
|
| #endif
|
|
|
| +#if defined(USE_OZONE)
|
| +#include "ui/ozone/public/ozone_platform.h"
|
| +#include "ui/ozone/public/surface_factory_ozone.h"
|
| +#endif
|
| +
|
| #if defined(USE_X11) && !defined(OS_CHROMEOS)
|
| extern "C" {
|
| #include <X11/Xlib.h>
|
| @@ -308,12 +313,21 @@ EGLConfig ChooseConfig(GLSurface::Format format) {
|
| choose_attributes = config_attribs_565;
|
| }
|
|
|
| + const EGLint* config_attribs;
|
| +#if defined(USE_OZONE)
|
| + config_attribs = ui::OzonePlatform::GetInstance()
|
| + ->GetSurfaceFactoryOzone()
|
| + ->GetEGLSurfaceProperties(choose_attributes);
|
| +#else
|
| + config_attribs = choose_attributes;
|
| +#endif
|
| +
|
| EGLint num_configs;
|
| EGLint config_size = 1;
|
| EGLConfig config = nullptr;
|
| EGLConfig* config_data = &config;
|
| // Validate if there are any configs for given attribs.
|
| - if (!ValidateEglConfig(g_display, choose_attributes, &num_configs)) {
|
| + if (!ValidateEglConfig(g_display, config_attribs, &num_configs)) {
|
| return config;
|
| }
|
|
|
| @@ -323,7 +337,7 @@ EGLConfig ChooseConfig(GLSurface::Format format) {
|
| config_data = matching_configs.get();
|
| }
|
|
|
| - if (!eglChooseConfig(g_display, choose_attributes, config_data, config_size,
|
| + if (!eglChooseConfig(g_display, config_attribs, config_data, config_size,
|
| &num_configs)) {
|
| LOG(ERROR) << "eglChooseConfig failed with error "
|
| << GetLastEGLErrorString();
|
|
|