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

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

Issue 2431383002: Ozone: Remove the use_wayland_egl build flag (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 | « ui/ozone/platform/wayland/BUILD.gn ('k') | 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 757f5490f78cfec53758693d71490b6aae39033e..46752c98114e533a392dfae7098438b4b79615ec 100644
--- a/ui/ozone/platform/wayland/wayland_surface_factory.cc
+++ b/ui/ozone/platform/wayland/wayland_surface_factory.cc
@@ -14,15 +14,12 @@
#include "ui/gfx/vsync_provider.h"
#include "ui/ozone/common/egl_util.h"
#include "ui/ozone/common/gl_ozone_egl.h"
+#include "ui/ozone/platform/wayland/gl_surface_wayland.h"
#include "ui/ozone/platform/wayland/wayland_connection.h"
#include "ui/ozone/platform/wayland/wayland_object.h"
#include "ui/ozone/platform/wayland/wayland_window.h"
#include "ui/ozone/public/surface_ozone_canvas.h"
-#if defined(USE_WAYLAND_EGL)
-#include "ui/ozone/platform/wayland/gl_surface_wayland.h"
-#endif
-
namespace ui {
static void DeleteSharedMemory(void* pixels, void* context) {
@@ -152,7 +149,6 @@ class GLOzoneEGLWayland : public GLOzoneEGL {
scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateViewGLSurface(
gfx::AcceleratedWidget widget) {
-#if defined(USE_WAYLAND_EGL)
DCHECK(connection_);
WaylandWindow* window = connection_->GetWindow(widget);
DCHECK(window);
@@ -162,23 +158,16 @@ scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateViewGLSurface(
if (!egl_window)
return nullptr;
return gl::InitializeGLSurface(new GLSurfaceWayland(std::move(egl_window)));
-#else
- return nullptr;
-#endif
}
scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateOffscreenGLSurface(
const gfx::Size& size) {
-#if defined(USE_WAYLAND_EGL)
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
}
intptr_t GLOzoneEGLWayland::GetNativeDisplay() {
@@ -186,12 +175,8 @@ intptr_t GLOzoneEGLWayland::GetNativeDisplay() {
}
bool GLOzoneEGLWayland::LoadGLES2Bindings() {
-#if defined(USE_WAYLAND_EGL)
setenv("EGL_PLATFORM", "wayland", 0);
return LoadDefaultEGLGLES2Bindings();
-#else
- return false;
-#endif
}
} // namespace
« no previous file with comments | « ui/ozone/platform/wayland/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698