scene: Schedule a repaint only if the output is affected by workspace repaint
If an output is not affected by a workspace repaint, then we don't have to schedule a repaint on that output. This improves the overall performance.
This commit is contained in:
parent
ee3515680a
commit
4a879379b3
1 changed files with 3 additions and 2 deletions
|
@ -66,6 +66,7 @@
|
|||
#include "deleted.h"
|
||||
#include "effects.h"
|
||||
#include "overlaywindow.h"
|
||||
#include "renderloop.h"
|
||||
#include "screens.h"
|
||||
#include "shadow.h"
|
||||
#include "subsurfacemonitor.h"
|
||||
|
@ -109,13 +110,13 @@ void Scene::addRepaint(const QRegion ®ion)
|
|||
const QRegion dirtyRegion = region & output->geometry();
|
||||
if (!dirtyRegion.isEmpty()) {
|
||||
m_repaints[screenId] += dirtyRegion;
|
||||
output->renderLoop()->scheduleRepaint();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m_repaints[0] += region;
|
||||
kwinApp()->platform()->renderLoop()->scheduleRepaint();
|
||||
}
|
||||
|
||||
Compositor::self()->scheduleRepaint();
|
||||
}
|
||||
|
||||
QRegion Scene::repaints(int screenId) const
|
||||
|
|
Loading…
Reference in a new issue