Resize effect supports QPainter compositing
This commit is contained in:
parent
9cecbc0135
commit
0fdd7d3f7d
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue