From b145ad6065cd644ade740119b6f50a7d0f2039bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 20 Nov 2010 13:30:55 +0100 Subject: [PATCH] Lanczos not available in ES --- lanczosfilter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lanczosfilter.cpp b/lanczosfilter.cpp index 088fb1bb1b..3e72196afb 100644 --- a/lanczosfilter.cpp +++ b/lanczosfilter.cpp @@ -170,6 +170,7 @@ void LanczosShader::createOffsets( int count, float width, Qt::Orientation direc void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data ) { #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES if( effects->compositingType() == KWin::OpenGLCompositing && data.opacity == 1.0 && KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects ) { @@ -327,6 +328,7 @@ void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region, return; } } // if ( effects->compositingType() == KWin::OpenGLCompositing ) +#endif #endif w->sceneWindow()->performPaint( mask, region, data ); } // End of function @@ -360,6 +362,7 @@ void LanczosFilter::timerEvent( QTimerEvent *event ) void LanczosFilter::prepareRenderStates( GLTexture* tex, double opacity, double brightness, double saturation ) { #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES const bool alpha = true; // setup blending of transparent windows glPushAttrib( GL_ENABLE_BIT ); @@ -476,12 +479,14 @@ void LanczosFilter::prepareRenderStates( GLTexture* tex, double opacity, double glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, constant ); } } +#endif #endif } void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double brightness, double saturation ) { #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES if( opacity != 1.0 || saturation != 1.0 || brightness != 1.0f ) { if( saturation != 1.0 && tex->saturationSupported()) @@ -499,6 +504,7 @@ void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double glColor4f( 0, 0, 0, 0 ); glPopAttrib(); // ENABLE_BIT +#endif #endif } @@ -506,6 +512,7 @@ void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double * LanczosShader ************************************************/ #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES LanczosShader::LanczosShader( QObject* parent ) : QObject( parent ) , m_shader( 0 ) @@ -639,6 +646,7 @@ bool LanczosShader::init() return true; } #endif +#endif } // namespace