From 14522ebecb0f90921b688ff48867039e740ecb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 20 Nov 2010 13:49:39 +0100 Subject: [PATCH] Fix Linker error with Lanczos filter --- lanczosfilter.cpp | 8 ++++++++ lanczosfilter.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/lanczosfilter.cpp b/lanczosfilter.cpp index 3e72196afb..4eba19bde3 100644 --- a/lanczosfilter.cpp +++ b/lanczosfilter.cpp @@ -38,9 +38,11 @@ namespace KWin LanczosFilter::LanczosFilter( QObject* parent ) : QObject( parent ) #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES , m_offscreenTex( 0 ) , m_offscreenTarget( 0 ) , m_shader( 0 ) +#endif #endif , m_inited( false) { @@ -49,8 +51,10 @@ LanczosFilter::LanczosFilter( QObject* parent ) LanczosFilter::~LanczosFilter() { #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES delete m_offscreenTarget; delete m_offscreenTex; +#endif #endif } @@ -60,6 +64,7 @@ void LanczosFilter::init() return; m_inited = true; #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES KSharedConfigPtr config = KSharedConfig::openConfig( "kwinrc" ); @@ -80,6 +85,7 @@ void LanczosFilter::init() delete m_shader; m_shader = 0; } +#endif #endif } @@ -126,6 +132,7 @@ static float lanczos( float x, float a ) } #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES void LanczosShader::createKernel( float delta, int *size ) { const float a = 2.0; @@ -166,6 +173,7 @@ void LanczosShader::createOffsets( int count, float width, Qt::Orientation direc } } #endif +#endif void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data ) { diff --git a/lanczosfilter.h b/lanczosfilter.h index b383918405..08c36da1d8 100644 --- a/lanczosfilter.h +++ b/lanczosfilter.h @@ -39,8 +39,10 @@ class GLTexture; class GLRenderTarget; class GLShader; #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES class LanczosShader; #endif +#endif class LanczosFilter : public QObject @@ -62,13 +64,16 @@ class LanczosFilter GLTexture *m_offscreenTex; GLRenderTarget *m_offscreenTarget; #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES LanczosShader *m_shader; +#endif #endif QBasicTimer m_timer; bool m_inited; }; #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES class LanczosShader : public QObject { @@ -95,6 +100,7 @@ class LanczosShader uint m_arbProgram; // TODO: GLuint }; #endif +#endif } // namespace