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

Unified Diff: ui/ozone/platform/x11/x11_surface_factory.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
Index: ui/ozone/platform/x11/x11_surface_factory.cc
diff --git a/ui/ozone/platform/x11/x11_surface_factory.cc b/ui/ozone/platform/x11/x11_surface_factory.cc
index 4e96c9b48d331fc1a3abdffd98f18484f82af735..8036a0405aa5063b6e55d6576023fd9c29a94695 100644
--- a/ui/ozone/platform/x11/x11_surface_factory.cc
+++ b/ui/ozone/platform/x11/x11_surface_factory.cc
@@ -68,7 +68,7 @@ void* /* EGLConfig */ X11SurfaceEGL::GetEGLSurfaceConfig(
EGL_RENDERABLE_TYPE,
EGL_OPENGL_ES2_BIT,
EGL_SURFACE_TYPE,
- EGL_WINDOW_BIT,
+ EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
EGL_NONE};
// Get the depth of XWindow for surface
@@ -126,6 +126,26 @@ bool X11SurfaceFactory::LoadEGLGLES2Bindings(
return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address);
}
+const int32_t* X11SurfaceFactory::GetEGLSurfaceProperties(
+ const int32_t* desired_list) {
+ static const EGLint kConfigAttribs[] = {EGL_BUFFER_SIZE,
+ 32,
+ EGL_ALPHA_SIZE,
+ 8,
+ EGL_BLUE_SIZE,
+ 8,
+ EGL_GREEN_SIZE,
+ 8,
+ EGL_RED_SIZE,
+ 8,
+ EGL_RENDERABLE_TYPE,
+ EGL_OPENGL_ES2_BIT,
+ EGL_SURFACE_TYPE,
+ EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
+ EGL_NONE};
+ return kConfigAttribs;
+}
+
intptr_t X11SurfaceFactory::GetNativeDisplay() {
return reinterpret_cast<intptr_t>(gfx::GetXDisplay());
}

Powered by Google App Engine
This is Rietveld 408576698