kwin: make decoration repaints window-specific

This gives the new Scene::paintSimpleScreen more room for optimizations.
remotes/origin/Plasma/5.0
Philipp Knechtges 15 years ago
parent 7025e72d87
commit fc5e74f4e2
  1. 5
      client.cpp
  2. 8
      composite.cpp
  3. 1
      toplevel.h

@ -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…
Cancel
Save