Restrict painting of the svg to the decoration. No need to paint behind the window as it isn't visible anyway.

That seems to fix the most painfull performance issues with Aurorae.

svn path=/trunk/KDE/kdebase/workspace/; revision=1011338
icc-effect-5.14.5
Martin Gräßlin 2009-08-14 11:16:02 +00:00
parent fd0ecc715a
commit 28e4a199c0
1 changed files with 21 additions and 0 deletions

View File

@ -685,6 +685,27 @@ void AuroraeClient::paintEvent(QPaintEvent *event)
}
}
// restrict painting on the decoration - no need to paint behind the window
int left, right, top, bottom;
decoration()->borders(left, right, top, bottom);
painter.setClipping(true);
painter.setClipRect(0, 0,
left + conf.paddingLeft(),
height() + conf.paddingTop() + conf.paddingBottom(),
Qt::ReplaceClip);
painter.setClipRect(0, 0,
width() + conf.paddingLeft() + conf.paddingRight(),
top + conf.paddingTop(),
Qt::UniteClip);
painter.setClipRect(width() - right + conf.paddingLeft(), 0,
right + conf.paddingRight(),
height() + conf.paddingTop() + conf.paddingBottom(),
Qt::UniteClip);
painter.setClipRect(0, height() - bottom + conf.paddingTop(),
width() + conf.paddingLeft() + conf.paddingRight(),
bottom + conf.paddingBottom(),
Qt::UniteClip);
// top
if (maximized) {
frame->setEnabledBorders(Plasma::FrameSvg::NoBorder);