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

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: Added format SURFACE_SURFACELESS. Created 4 years, 9 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 | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »
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..8449877400735641b919c559609bf70ee4be2d8a 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -283,6 +283,10 @@ EGLConfig ChooseConfig(GLSurface::Format format) {
}
#endif
+ EGLint surface_type = (format == GLSurface::SURFACE_SURFACELESS)
+ ? EGL_DONT_CARE
+ : EGL_WINDOW_BIT | EGL_PBUFFER_BIT;
+
EGLint config_attribs_8888[] = {
EGL_BUFFER_SIZE, buffer_size,
EGL_ALPHA_SIZE, alpha_size,
@@ -290,7 +294,7 @@ EGLConfig ChooseConfig(GLSurface::Format format) {
EGL_GREEN_SIZE, 8,
EGL_RED_SIZE, 8,
EGL_RENDERABLE_TYPE, renderable_type,
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
+ EGL_SURFACE_TYPE, surface_type,
EGL_NONE
};
@@ -301,7 +305,7 @@ EGLConfig ChooseConfig(GLSurface::Format format) {
EGL_GREEN_SIZE, 6,
EGL_RED_SIZE, 5,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
+ EGL_SURFACE_TYPE, surface_type,
EGL_NONE
};
if (format == GLSurface::SURFACE_RGB565) {
@@ -436,8 +440,7 @@ void GetEGLInitDisplays(bool supports_angle_d3d,
}
}
-GLSurfaceEGL::GLSurfaceEGL() :
- config_(nullptr) {}
+GLSurfaceEGL::GLSurfaceEGL() {}
bool GLSurfaceEGL::InitializeOneOff() {
static bool initialized = false;
@@ -1068,6 +1071,11 @@ PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
SurfacelessEGL::SurfacelessEGL(const gfx::Size& size)
: size_(size) {
+ format_ = GLSurface::SURFACE_SURFACELESS;
+}
+
+bool SurfacelessEGL::Initialize() {
+ return Initialize(SURFACE_SURFACELESS);
}
bool SurfacelessEGL::Initialize(GLSurface::Format format) {
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698