Drop build option KWIN_BUILD_EGL

It doesn't make much sense any more as we do no longer link EGL since the
switch to epoxy. And epoxy pulls it in at runtime if needed.
Even more on Wayland it's just plain stupid to have EGL disabled. So
removing the option just simplifies our code base without any
disadvantages.

REVIEW: 124695
icc-effect-5.14.5
Martin Gräßlin 2015-08-11 10:27:18 +02:00
parent a596ff556e
commit c24e315a9b
10 changed files with 5 additions and 51 deletions

View File

@ -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}

View File

@ -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()

View File

@ -23,11 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "logging.h"
#include "wayland_server.h"
#include "xcbutils.h"
#ifdef KWIN_HAVE_EGL
#if HAVE_X11_XCB
#include "eglonxbackend.h"
#endif
#endif
#include <kwinxrenderutils.h>
#include <QAbstractEventDispatcher>
#include <QCoreApplication>
@ -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;
}

View File

@ -248,9 +248,7 @@ QStringList CompositorDBusInterface::supportedOpenGLPlatformInterfaces() const
if (supportsGlx) {
interfaces << QStringLiteral("glx");
}
#ifdef KWIN_HAVE_EGL
interfaces << QStringLiteral("egl");
#endif
return interfaces;
}

View File

@ -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

View File

@ -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)

View File

@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 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 <http://www.gnu.org/licenses/>.
} 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)
{

View File

@ -25,9 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kwinconfig.h>
#include <kwinglobals.h>
#ifdef KWIN_HAVE_EGL
#include <epoxy/egl.h>
#endif
#ifndef KWIN_HAVE_OPENGLES
#include <epoxy/glx.h>
@ -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);

View File

@ -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) {

View File

@ -27,9 +27,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#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