From f2c142e8fb52a369580a444244635883d69b3a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 1 Nov 2010 14:37:04 +0000 Subject: [PATCH] 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 --- effects/boxswitch/boxswitch.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/effects/boxswitch/boxswitch.cpp b/effects/boxswitch/boxswitch.cpp index 8fd96c9f7e..0963c8d88b 100644 --- a/effects/boxswitch/boxswitch.cpp +++ b/effects/boxswitch/boxswitch.cpp @@ -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 ); } }