Commit 592633ee authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Fix KWIN_BUILD_XRENDER_COMPOSITING build option

parent d99e6b5d
......@@ -90,10 +90,12 @@ QPainterBackend *Platform::createQPainterBackend()
return nullptr;
}
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderBackend *Platform::createXRenderBackend()
{
return nullptr;
}
#endif
void Platform::prepareShutdown()
{
......
......@@ -42,7 +42,9 @@ class Scene;
class Screens;
class ScreenEdges;
class Toplevel;
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
class XRenderBackend;
#endif
namespace Decoration
{
......@@ -71,7 +73,9 @@ public:
virtual Screens *createScreens(QObject *parent = nullptr);
virtual OpenGLBackend *createOpenGLBackend();
virtual QPainterBackend *createQPainterBackend();
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
virtual XRenderBackend *createXRenderBackend();
#endif
virtual DmaBufTexture *createDmaBufTexture(const QSize &size) {
Q_UNUSED(size);
return nullptr;
......
add_subdirectory(qpainter)
add_subdirectory(opengl)
add_subdirectory(xrender)
if (KWIN_BUILD_XRENDER_COMPOSITING)
add_subdirectory(xrender)
endif()
......@@ -12,7 +12,6 @@ set(X11PLATFORM_SOURCES
x11_output.cpp
x11_platform.cpp
x11cursor.cpp
x11xrenderbackend.cpp
xfixes_cursor_event_filter.cpp
)
......@@ -29,11 +28,16 @@ include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/xrender)
add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES})
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)
target_link_libraries(KWinX11Platform ${X11_Xinput_LIB})
endif()
if (KWIN_BUILD_XRENDER_COMPOSITING)
target_sources(KWinX11Platform PRIVATE x11xrenderbackend.cpp)
target_link_libraries(KWinX11Platform SceneXRenderBackend)
endif()
if (HAVE_DL_LIBRARY)
target_link_libraries(KWinX11Platform ${DL_LIBRARY})
endif()
......
......@@ -10,7 +10,9 @@
#include "x11cursor.h"
#include "edge.h"
#include "windowselector.h"
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
#include "x11xrenderbackend.h"
#endif
#include <config-kwin.h>
#include <kwinconfig.h>
#if HAVE_EPOXY_GLX
......@@ -120,10 +122,12 @@ OpenGLBackend *X11StandalonePlatform::createOpenGLBackend()
}
}
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderBackend *X11StandalonePlatform::createXRenderBackend()
{
return new X11XRenderBackend(this);
}
#endif
Edge *X11StandalonePlatform::createScreenEdge(ScreenEdges *edges)
{
......
......@@ -35,7 +35,9 @@ public:
Screens *createScreens(QObject *parent = nullptr) override;
OpenGLBackend *createOpenGLBackend() override;
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderBackend *createXRenderBackend() override;
#endif
Edge *createScreenEdge(ScreenEdges *parent) override;
void createPlatformCursor(QObject *parent = nullptr) override;
bool requiresCompositing() const override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment