Commit 648dab44 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

platforms/drm: Don't intersect the final output damage twice

parent dbcf43ab
......@@ -568,7 +568,8 @@ void EglGbmBackend::endRenderingFrameForScreen(int screenId,
Output &output = m_outputs[screenId];
renderFramebufferToSurface(output);
if (damagedRegion.intersected(output.output->geometry()).isEmpty()) {
const QRegion dirty = damagedRegion.intersected(output.output->geometry());
if (dirty.isEmpty()) {
// If the damaged region of a window is fully occluded, the only
// rendering done, if any, will have been to repair a reused back
......@@ -589,7 +590,7 @@ void EglGbmBackend::endRenderingFrameForScreen(int screenId,
if (output.damageHistory.count() > 10) {
output.damageHistory.removeLast();
}
output.damageHistory.prepend(damagedRegion.intersected(output.output->geometry()));
output.damageHistory.prepend(dirty);
}
}
......
Supports Markdown
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