diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d2aeed4f5..056801feaa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,7 +223,6 @@ option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
option(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF)
-option(KWIN_BUILD_EGL "Enables building the EGL backend in KWin" ON)
option(KWIN_BUILD_COVERAGE "Build KWin with gcov support" OFF)
@@ -267,8 +266,6 @@ if( KWIN_BUILD_XRENDER_COMPOSITING )
set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
endif()
-set(KWIN_HAVE_EGL ${KWIN_BUILD_EGL})
-
if (XKB_FOUND)
include_directories(${XKB_INCLUDE_DIR})
endif()
@@ -281,11 +278,7 @@ configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib
if(XKB_FOUND AND KF5Wayland_FOUND)
set(HAVE_WAYLAND TRUE)
set(HAVE_XKB ${XKB_FOUND})
- if (KWIN_HAVE_EGL)
- set(HAVE_WAYLAND_EGL ${Wayland_Egl_FOUND})
- else()
- set(HAVE_WAYLAND_EGL FALSE)
- endif()
+ set(HAVE_WAYLAND_EGL ${Wayland_Egl_FOUND})
set(HAVE_WAYLAND_CURSOR ${Wayland_Cursor_FOUND})
set(HAVE_X11_XCB ${X11_XCB_FOUND})
else()
@@ -298,10 +291,6 @@ else()
set(HAVE_GBM FALSE)
endif()
-if(NOT KWIN_HAVE_EGL)
- set(HAVE_GBM FALSE)
-endif()
-
include(CheckIncludeFiles)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(malloc.h HAVE_MALLOC_H)
@@ -407,6 +396,8 @@ set(kwin_KDEINIT_SRCS
decorations/settings.cpp
decorations/decorationrenderer.cpp
decorations/decorations_logging.cpp
+ abstract_egl_backend.cpp
+ eglonxbackend.cpp
)
if(KWIN_BUILD_TABBOX)
@@ -430,10 +421,6 @@ if(KWIN_BUILD_ACTIVITIES)
)
endif()
-if(KWIN_HAVE_EGL)
- set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} abstract_egl_backend.cpp eglonxbackend.cpp)
-endif()
-
if(HAVE_WAYLAND)
set(kwin_KDEINIT_SRCS
${kwin_KDEINIT_SRCS}
diff --git a/backends/wayland/CMakeLists.txt b/backends/wayland/CMakeLists.txt
index a1670a34b1..7f643df2e1 100644
--- a/backends/wayland/CMakeLists.txt
+++ b/backends/wayland/CMakeLists.txt
@@ -4,14 +4,14 @@ set(WAYLAND_BACKEND_SOURCES
screens_wayland.cpp
wayland_backend.cpp
)
-if(KWIN_HAVE_EGL AND Wayland_Egl_FOUND)
+if(Wayland_Egl_FOUND)
set(WAYLAND_BACKEND_SOURCES ${WAYLAND_BACKEND_SOURCES} egl_wayland_backend.cpp)
endif()
add_library(KWinWaylandWaylandBackend MODULE ${WAYLAND_BACKEND_SOURCES})
target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient)
-if(KWIN_HAVE_EGL AND Wayland_Egl_FOUND)
+if(Wayland_Egl_FOUND)
target_link_libraries(KWinWaylandWaylandBackend Wayland::Egl)
endif()
diff --git a/backends/x11/x11windowed_backend.cpp b/backends/x11/x11windowed_backend.cpp
index 3ba9e5cd39..95a5b70ecf 100644
--- a/backends/x11/x11windowed_backend.cpp
+++ b/backends/x11/x11windowed_backend.cpp
@@ -23,11 +23,9 @@ along with this program. If not, see .
#include "logging.h"
#include "wayland_server.h"
#include "xcbutils.h"
-#ifdef KWIN_HAVE_EGL
#if HAVE_X11_XCB
#include "eglonxbackend.h"
#endif
-#endif
#include
#include
#include
@@ -327,10 +325,8 @@ Screens *X11WindowedBackend::createScreens(QObject *parent)
OpenGLBackend *X11WindowedBackend::createOpenGLBackend()
{
-#ifdef KWIN_HAVE_EGL
#if HAVE_X11_XCB
return new EglOnXBackend(connection(), display(), rootWindow(), screenNumer(), window());
-#endif
#endif
return nullptr;
}
diff --git a/dbusinterface.cpp b/dbusinterface.cpp
index 01079a1b2a..42087dca5f 100644
--- a/dbusinterface.cpp
+++ b/dbusinterface.cpp
@@ -248,9 +248,7 @@ QStringList CompositorDBusInterface::supportedOpenGLPlatformInterfaces() const
if (supportsGlx) {
interfaces << QStringLiteral("glx");
}
-#ifdef KWIN_HAVE_EGL
interfaces << QStringLiteral("egl");
-#endif
return interfaces;
}
diff --git a/libkwineffects/kwinconfig.h.cmake b/libkwineffects/kwinconfig.h.cmake
index 3e34723aea..a8586cc9b6 100644
--- a/libkwineffects/kwinconfig.h.cmake
+++ b/libkwineffects/kwinconfig.h.cmake
@@ -19,7 +19,5 @@
/* KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available */
#cmakedefine KWIN_HAVE_XRENDER_COMPOSITING
-#cmakedefine KWIN_HAVE_EGL
-
#endif
diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp
index 66634d6795..7604554331 100644
--- a/libkwineffects/kwinglutils.cpp
+++ b/libkwineffects/kwinglutils.cpp
@@ -91,7 +91,6 @@ void initGLX()
void initEGL()
{
-#ifdef KWIN_HAVE_EGL
EGLDisplay dpy = eglGetCurrentDisplay();
int major, minor;
eglInitialize(dpy, &major, &minor);
@@ -99,7 +98,6 @@ void initEGL()
const QByteArray string = eglQueryString(dpy, EGL_EXTENSIONS);
eglExtensions = string.split(' ');
eglResolveFunctions();
-#endif
}
void initGL(OpenGLPlatformInterface platformInterface)
diff --git a/libkwineffects/kwinglutils_funcs.cpp b/libkwineffects/kwinglutils_funcs.cpp
index 4e763b7bb1..dfb673b7c0 100644
--- a/libkwineffects/kwinglutils_funcs.cpp
+++ b/libkwineffects/kwinglutils_funcs.cpp
@@ -24,7 +24,6 @@ along with this program. If not, see .
// Resolves given function, using getProcAddress
-#ifdef KWIN_HAVE_EGL
#define GL_RESOLVE( function ) \
if (platformInterface == GlxPlatformInterface) \
function = (function ## _func)getProcAddress( #function ); \
@@ -38,13 +37,6 @@ along with this program. If not, see .
} else if (platformInterface == EglPlatformInterface) { \
function = (function ## _func)eglGetProcAddress( #symbolName ); \
}
-#else
-// same without the switch to egl
-#define GL_RESOLVE( function ) function = (function ## _func)getProcAddress( #function );
-
-#define GL_RESOLVE_WITH_EXT( function, symbolName ) \
- function = (function ## _func)getProcAddress( #symbolName );
-#endif
namespace KWin
{
@@ -82,11 +74,9 @@ void glxResolveFunctions()
}
#endif
-#ifdef KWIN_HAVE_EGL
void eglResolveFunctions()
{
}
-#endif
void glResolveFunctions(OpenGLPlatformInterface platformInterface)
{
diff --git a/libkwineffects/kwinglutils_funcs.h b/libkwineffects/kwinglutils_funcs.h
index eea28c5ae4..ba9dd46799 100644
--- a/libkwineffects/kwinglutils_funcs.h
+++ b/libkwineffects/kwinglutils_funcs.h
@@ -25,9 +25,7 @@ along with this program. If not, see .
#include
#include
-#ifdef KWIN_HAVE_EGL
#include
-#endif
#ifndef KWIN_HAVE_OPENGLES
#include
@@ -57,9 +55,7 @@ namespace KWin
void KWINGLUTILS_EXPORT glxResolveFunctions();
#endif
-#ifdef KWIN_HAVE_EGL
void KWINGLUTILS_EXPORT eglResolveFunctions();
-#endif
void KWINGLUTILS_EXPORT glResolveFunctions(OpenGLPlatformInterface platformInterface);
diff --git a/options.cpp b/options.cpp
index 39efd9de53..64269d64bc 100644
--- a/options.cpp
+++ b/options.cpp
@@ -767,11 +767,6 @@ void Options::setGlPlatformInterface(OpenGLPlatformInterface interface)
#ifdef KWIN_HAVE_OPENGLES
qCDebug(KWIN_CORE) << "Forcing EGL native interface as compiled against OpenGL ES";
interface = EglPlatformInterface;
-#else
-#ifndef KWIN_HAVE_EGL
- qCDebug(KWIN_CORE) << "Forcing GLX native interface as compiled without EGL support";
- interface = GlxPlatformInterface;
-#endif
#endif
if (m_glPlatformInterface == interface) {
diff --git a/scene_opengl.cpp b/scene_opengl.cpp
index 85c0b10478..3e9b849ea7 100644
--- a/scene_opengl.cpp
+++ b/scene_opengl.cpp
@@ -27,9 +27,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*********************************************************************/
#include "scene_opengl.h"
-#ifdef KWIN_HAVE_EGL
#include "eglonxbackend.h"
-#endif // KWIN_HAVE_EGL
#ifndef KWIN_HAVE_OPENGLES
#include "glxbackend.h"
#endif // KWIN_HAVE_OPENGLES
@@ -548,7 +546,6 @@ SceneOpenGL *SceneOpenGL::createScene(QObject *parent)
#endif
break;
case EglPlatformInterface:
-#ifdef KWIN_HAVE_EGL
#if HAVE_WAYLAND
if (kwinApp()->shouldUseWaylandForCompositing()) {
backend = waylandServer()->backend()->createOpenGLBackend();
@@ -557,7 +554,6 @@ SceneOpenGL *SceneOpenGL::createScene(QObject *parent)
{
backend = new EglOnXBackend();
}
-#endif // KWIN_HAVE_EGL
break;
default:
// no backend available