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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 1738973004: Fix EGL configs with GLSurfaceOzoneSurfaceless. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add back factory method. Created 4 years, 10 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 | « no previous file | ui/gl/gl_surface_ozone.cc » ('j') | ui/ozone/platform/drm/gpu/gbm_surface_factory.cc » ('J')
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 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();
« no previous file with comments | « no previous file | ui/gl/gl_surface_ozone.cc » ('j') | ui/ozone/platform/drm/gpu/gbm_surface_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698