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

Unified Diff: ui/ozone/platform/wayland/wayland_surface_factory.cc

Issue 2387063002: [ozone/wayland] Use SurfacelessEGL when supported (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/wayland_surface_factory.cc
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.cc b/ui/ozone/platform/wayland/wayland_surface_factory.cc
index 4a443bf1c702a9c7686b8f9dfe81356d3963a489..757f5490f78cfec53758693d71490b6aae39033e 100644
--- a/ui/ozone/platform/wayland/wayland_surface_factory.cc
+++ b/ui/ozone/platform/wayland/wayland_surface_factory.cc
@@ -170,7 +170,12 @@ scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateViewGLSurface(
scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateOffscreenGLSurface(
const gfx::Size& size) {
#if defined(USE_WAYLAND_EGL)
- return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size));
+ if (gl::GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
+ size.width() == 0 && size.height() == 0) {
+ return gl::InitializeGLSurface(new gl::SurfacelessEGL(size));
+ } else {
+ return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size));
+ }
#else
return nullptr;
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698