From 2d9e588051f08eb5d77f07c23c079c233d26665a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 7 Jul 2011 19:17:00 +0200 Subject: [PATCH] Add build option to suppress building of XRender Compositing --- CMakeLists.txt | 6 ++++-- effects.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b132ee91c..a37fbd8c51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ OPTION(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON) OPTION(KWIN_MOBILE_EFFECTS "Only build effects relevant for mobile devices" OFF) OPTION(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON) OPTION(KWIN_BUILD_SCREENEDGES "Enable building of KWin with screen edge support" ON) +OPTION(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON) OPTION(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF) if(KWIN_PLASMA_ACTIVE) @@ -12,6 +13,7 @@ if(KWIN_PLASMA_ACTIVE) set(KWIN_BUILD_KCMS OFF) set(KWIN_BUILD_TABBOX OFF) set(KWIN_BUILD_SCREENEDGES OFF) + set(KWIN_BUILD_XRENDER_COMPOSITING OFF) set(KWIN_MOBILE_EFFECTS ON) set(KWIN_BUILD_WITH_OPENGLES ON) endif(KWIN_PLASMA_ACTIVE) @@ -27,9 +29,9 @@ if( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND ) endif( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND ) # KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available -if( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND ) +if( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND AND KWIN_BUILD_XRENDER_COMPOSITING ) set( KWIN_HAVE_XRENDER_COMPOSITING 1 ) -endif( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND ) +endif( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND AND KWIN_BUILD_XRENDER_COMPOSITING ) # KWIN_HAVE_OPENGLES_COMPOSITING - whether OpenGL ES-based compositing support is available if( KWIN_HAVE_COMPOSITING AND OPENGLES_FOUND AND KWIN_BUILD_WITH_OPENGLES) diff --git a/effects.cpp b/effects.cpp index 0e743abaca..af78801640 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1758,7 +1758,9 @@ EffectFrameImpl::EffectFrameImpl(EffectFrameStyle style, bool staticSize, QPoint m_sceneFrame = new SceneOpenGL::EffectFrame(this); #endif } else if (effects->compositingType() == XRenderCompositing) { +#ifdef KWIN_HAVE_XRENDER_COMPOSITING m_sceneFrame = new SceneXrender::EffectFrame(this); +#endif } else { // that should not happen and will definitely crash! m_sceneFrame = NULL;