Lanczos not available in ES

icc-effect-5.14.5
Martin Gräßlin 2010-11-20 13:30:55 +01:00
parent 5fae85f2a5
commit b145ad6065
1 changed files with 8 additions and 0 deletions

View File

@ -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 ) void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data )
{ {
#ifdef KWIN_HAVE_OPENGL_COMPOSITING #ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
if( effects->compositingType() == KWin::OpenGLCompositing && data.opacity == 1.0 && if( effects->compositingType() == KWin::OpenGLCompositing && data.opacity == 1.0 &&
KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects ) KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects )
{ {
@ -327,6 +328,7 @@ void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region,
return; return;
} }
} // if ( effects->compositingType() == KWin::OpenGLCompositing ) } // if ( effects->compositingType() == KWin::OpenGLCompositing )
#endif
#endif #endif
w->sceneWindow()->performPaint( mask, region, data ); w->sceneWindow()->performPaint( mask, region, data );
} // End of function } // End of function
@ -360,6 +362,7 @@ void LanczosFilter::timerEvent( QTimerEvent *event )
void LanczosFilter::prepareRenderStates( GLTexture* tex, double opacity, double brightness, double saturation ) void LanczosFilter::prepareRenderStates( GLTexture* tex, double opacity, double brightness, double saturation )
{ {
#ifdef KWIN_HAVE_OPENGL_COMPOSITING #ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
const bool alpha = true; const bool alpha = true;
// setup blending of transparent windows // setup blending of transparent windows
glPushAttrib( GL_ENABLE_BIT ); 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 ); glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, constant );
} }
} }
#endif
#endif #endif
} }
void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double brightness, double saturation ) void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double brightness, double saturation )
{ {
#ifdef KWIN_HAVE_OPENGL_COMPOSITING #ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
if( opacity != 1.0 || saturation != 1.0 || brightness != 1.0f ) if( opacity != 1.0 || saturation != 1.0 || brightness != 1.0f )
{ {
if( saturation != 1.0 && tex->saturationSupported()) if( saturation != 1.0 && tex->saturationSupported())
@ -499,6 +504,7 @@ void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double
glColor4f( 0, 0, 0, 0 ); glColor4f( 0, 0, 0, 0 );
glPopAttrib(); // ENABLE_BIT glPopAttrib(); // ENABLE_BIT
#endif
#endif #endif
} }
@ -506,6 +512,7 @@ void LanczosFilter::restoreRenderStates( GLTexture* tex, double opacity, double
* LanczosShader * LanczosShader
************************************************/ ************************************************/
#ifdef KWIN_HAVE_OPENGL_COMPOSITING #ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
LanczosShader::LanczosShader( QObject* parent ) LanczosShader::LanczosShader( QObject* parent )
: QObject( parent ) : QObject( parent )
, m_shader( 0 ) , m_shader( 0 )
@ -639,6 +646,7 @@ bool LanczosShader::init()
return true; return true;
} }
#endif #endif
#endif
} // namespace } // namespace