Use Lanczos in Boxswitch also during animation.

Thanks to the caching the animation does not cause performance problems any more.

svn path=/trunk/KDE/kdebase/workspace/; revision=1191948
This commit is contained in:
Martin Gräßlin 2010-11-01 14:37:04 +00:00
parent e0a1eae9ec
commit f2c142e8fb

View file

@ -815,7 +815,7 @@ void BoxSwitchEffect::paintWindowThumbnail( EffectWindow* w )
// paint one part of the thumbnail
effects->paintWindow( w,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS,
windows[ w ]->thumbnail, data );
QRect secondThumbnail;
@ -864,7 +864,7 @@ void BoxSwitchEffect::paintWindowThumbnail( EffectWindow* w )
secondThumbnail.adjusted( highlight_margin, highlight_margin, -highlight_margin, -highlight_margin ),
Qt::KeepAspectRatio );
effects->paintWindow( w,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS,
windows[ w ]->thumbnail, data );
}
else if( ( windows.size() % 2 == 0 ) && ( w == right_window ) )
@ -916,7 +916,7 @@ void BoxSwitchEffect::paintWindowThumbnail( EffectWindow* w )
// left quads are painted on right side of frame
data.quads = leftQuads;
effects->drawWindow( w,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS,
windows[ w ]->thumbnail, data );
// right quads are painted on left side of frame
@ -930,16 +930,13 @@ void BoxSwitchEffect::paintWindowThumbnail( EffectWindow* w )
secondThumbnail.adjusted( highlight_margin, highlight_margin, -highlight_margin, -highlight_margin ),
Qt::KeepAspectRatio );
effects->drawWindow( w,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS,
windows[ w ]->thumbnail, data );
}
else
{
int mask = PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED;
if (!mAnimateSwitch)
mask |= PAINT_WINDOW_LANCZOS;
effects->drawWindow( w,
mask,
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS,
windows[ w ]->thumbnail, data );
}
}