kwin: make decoration repaints window-specific
This gives the new Scene::paintSimpleScreen more room for optimizations.
This commit is contained in:
parent
7025e72d87
commit
fc5e74f4e2
3 changed files with 12 additions and 2 deletions
|
@ -500,8 +500,9 @@ void Client::repaintDecorationPending()
|
|||
// The scene will update the decoration pixmaps in the next painting pass
|
||||
// if it has not been already repainted before
|
||||
const QRegion r = paintRedirector->scheduledRepaintRegion();
|
||||
if (!r.isEmpty())
|
||||
Workspace::self()->addRepaint(r.translated(x() - padding_left, y() - padding_top));
|
||||
if (!r.isEmpty()) {
|
||||
addRepaint(r.translated(-padding_left,-padding_top));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -748,6 +748,14 @@ void Toplevel::addRepaint(int x, int y, int w, int h)
|
|||
workspace()->checkCompositeTimer();
|
||||
}
|
||||
|
||||
void Toplevel::addRepaint(const QRegion& r)
|
||||
{
|
||||
if (!compositing())
|
||||
return;
|
||||
repaints_region += r;
|
||||
workspace()->checkCompositeTimer();
|
||||
}
|
||||
|
||||
void Toplevel::addRepaintFull()
|
||||
{
|
||||
repaints_region = decorationRect();
|
||||
|
|
|
@ -124,6 +124,7 @@ public:
|
|||
bool unredirected() const;
|
||||
void suspendUnredirect(bool suspend);
|
||||
void addRepaint(const QRect& r);
|
||||
void addRepaint(const QRegion& r);
|
||||
void addRepaint(int x, int y, int w, int h);
|
||||
virtual void addRepaintFull();
|
||||
// these call workspace->addRepaint(), but first transform the damage if needed
|
||||
|
|
Loading…
Reference in a new issue