Resize effect supports QPainter compositing

This commit is contained in:
Martin Gräßlin 2013-06-24 08:13:29 +02:00
parent 9cecbc0135
commit 0fdd7d3f7d

View file

@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KColorScheme> #include <KColorScheme>
#include <QtGui/QVector2D> #include <QtGui/QVector2D>
#include <QPainter>
namespace KWin namespace KWin
{ {
@ -118,6 +119,15 @@ void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window
rects.count(), rects.constData()); rects.count(), rects.constData());
} }
#endif #endif
if (effects->compositingType() == QPainterCompositing) {
QPainter *painter = effects->scenePainter();
painter->save();
color.setAlphaF(alpha);
foreach (const QRect &r, paintRegion.rects()) {
painter->fillRect(r, color);
}
painter->restore();
}
} }
} else { } else {
AnimationEffect::paintWindow(w, mask, region, data); AnimationEffect::paintWindow(w, mask, region, data);