Fix KWIN_BUILD_XRENDER_COMPOSITING build option

This commit is contained in:
Vlad Zahorodnii 2020-12-08 11:17:56 +02:00
parent d99e6b5d2a
commit 592633eed7
6 changed files with 21 additions and 3 deletions

View file

@ -90,10 +90,12 @@ QPainterBackend *Platform::createQPainterBackend()
return nullptr; return nullptr;
} }
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderBackend *Platform::createXRenderBackend() XRenderBackend *Platform::createXRenderBackend()
{ {
return nullptr; return nullptr;
} }
#endif
void Platform::prepareShutdown() void Platform::prepareShutdown()
{ {

View file

@ -42,7 +42,9 @@ class Scene;
class Screens; class Screens;
class ScreenEdges; class ScreenEdges;
class Toplevel; class Toplevel;
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
class XRenderBackend; class XRenderBackend;
#endif
namespace Decoration namespace Decoration
{ {
@ -71,7 +73,9 @@ public:
virtual Screens *createScreens(QObject *parent = nullptr); virtual Screens *createScreens(QObject *parent = nullptr);
virtual OpenGLBackend *createOpenGLBackend(); virtual OpenGLBackend *createOpenGLBackend();
virtual QPainterBackend *createQPainterBackend(); virtual QPainterBackend *createQPainterBackend();
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
virtual XRenderBackend *createXRenderBackend(); virtual XRenderBackend *createXRenderBackend();
#endif
virtual DmaBufTexture *createDmaBufTexture(const QSize &size) { virtual DmaBufTexture *createDmaBufTexture(const QSize &size) {
Q_UNUSED(size); Q_UNUSED(size);
return nullptr; return nullptr;

View file

@ -1,3 +1,5 @@
add_subdirectory(qpainter) add_subdirectory(qpainter)
add_subdirectory(opengl) add_subdirectory(opengl)
add_subdirectory(xrender) if (KWIN_BUILD_XRENDER_COMPOSITING)
add_subdirectory(xrender)
endif()

View file

@ -12,7 +12,6 @@ set(X11PLATFORM_SOURCES
x11_output.cpp x11_output.cpp
x11_platform.cpp x11_platform.cpp
x11cursor.cpp x11cursor.cpp
x11xrenderbackend.cpp
xfixes_cursor_event_filter.cpp xfixes_cursor_event_filter.cpp
) )
@ -29,11 +28,16 @@ include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/xrender)
add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES}) add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES})
set_target_properties(KWinX11Platform PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.platforms/") set_target_properties(KWinX11Platform PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.platforms/")
target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils SceneOpenGLBackend SceneXRenderBackend Qt5::X11Extras XCB::CURSOR KF5::Crash ) target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils SceneOpenGLBackend Qt5::X11Extras XCB::CURSOR KF5::Crash )
if (X11_Xinput_FOUND) if (X11_Xinput_FOUND)
target_link_libraries(KWinX11Platform ${X11_Xinput_LIB}) target_link_libraries(KWinX11Platform ${X11_Xinput_LIB})
endif() endif()
if (KWIN_BUILD_XRENDER_COMPOSITING)
target_sources(KWinX11Platform PRIVATE x11xrenderbackend.cpp)
target_link_libraries(KWinX11Platform SceneXRenderBackend)
endif()
if (HAVE_DL_LIBRARY) if (HAVE_DL_LIBRARY)
target_link_libraries(KWinX11Platform ${DL_LIBRARY}) target_link_libraries(KWinX11Platform ${DL_LIBRARY})
endif() endif()

View file

@ -10,7 +10,9 @@
#include "x11cursor.h" #include "x11cursor.h"
#include "edge.h" #include "edge.h"
#include "windowselector.h" #include "windowselector.h"
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
#include "x11xrenderbackend.h" #include "x11xrenderbackend.h"
#endif
#include <config-kwin.h> #include <config-kwin.h>
#include <kwinconfig.h> #include <kwinconfig.h>
#if HAVE_EPOXY_GLX #if HAVE_EPOXY_GLX
@ -120,10 +122,12 @@ OpenGLBackend *X11StandalonePlatform::createOpenGLBackend()
} }
} }
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderBackend *X11StandalonePlatform::createXRenderBackend() XRenderBackend *X11StandalonePlatform::createXRenderBackend()
{ {
return new X11XRenderBackend(this); return new X11XRenderBackend(this);
} }
#endif
Edge *X11StandalonePlatform::createScreenEdge(ScreenEdges *edges) Edge *X11StandalonePlatform::createScreenEdge(ScreenEdges *edges)
{ {

View file

@ -35,7 +35,9 @@ public:
Screens *createScreens(QObject *parent = nullptr) override; Screens *createScreens(QObject *parent = nullptr) override;
OpenGLBackend *createOpenGLBackend() override; OpenGLBackend *createOpenGLBackend() override;
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderBackend *createXRenderBackend() override; XRenderBackend *createXRenderBackend() override;
#endif
Edge *createScreenEdge(ScreenEdges *parent) override; Edge *createScreenEdge(ScreenEdges *parent) override;
void createPlatformCursor(QObject *parent = nullptr) override; void createPlatformCursor(QObject *parent = nullptr) override;
bool requiresCompositing() const override; bool requiresCompositing() const override;