Commit ac203818 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

platforms/drm: Enable buffer age for all outputs

parent 74391e25
......@@ -568,7 +568,7 @@ void EglGbmBackend::endRenderingFrameForScreen(int screenId,
Output &output = m_outputs[screenId];
renderFramebufferToSurface(output);
if (damagedRegion.intersected(output.output->geometry()).isEmpty() && screenId == 0) {
if (damagedRegion.intersected(output.output->geometry()).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
......@@ -580,22 +580,12 @@ void EglGbmBackend::endRenderingFrameForScreen(int screenId,
if (!renderedRegion.intersected(output.output->geometry()).isEmpty())
glFlush();
for (auto &output: m_outputs) {
output.bufferAge = 1;
}
output.bufferAge = 1;
return;
}
presentOnOutput(output, damagedRegion);
// Save the damaged region to history
// Note: damage history is only collected for the first screen. For any other screen full
// repaints are triggered. This is due to a limitation in Scene::paintGenericScreen which resets
// the Toplevel's repaint. So multiple calls to Scene::paintScreen as it's done in multi-output
// rendering only have correct damage information for the first screen. If we try to track
// damage nevertheless, it creates artifacts. So for the time being we work around the problem
// by only supporting buffer age on the first output. To properly support buffer age on all
// outputs the rendering needs to be refactored in general.
if (supportsBufferAge() && screenId == 0) {
if (supportsBufferAge()) {
if (output.damageHistory.count() > 10) {
output.damageHistory.removeLast();
}
......
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