Commit 4a879379 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

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.
parent ee351568
......@@ -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 &region)
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment