Skip to content

compositor/x11: Sync again at the end of before_paint

Daniel van Vugt requested to merge vanvugt/mutter:sync-before-paint-again into main

The existing comment tells us this is necessary:

there may be drawing between the last damage event and the XDamageSubtract() that needs to be flushed as well.

But the commit message for 551101c6 also tells us that synchronization is necessary before-update. Assuming both are correct then it needs to be done in both places.

I did try optimizing out the second sync to only do it if damage arrived during the update, but that doesn't seem to be the issue. The damage event is arriving before the update starts and it's some secondary changes within the damage region running late that need flushing. So this means the client is reporting damage more frequently than the frame rate and we're ignoring the secondary damage reports for efficiency (XDamageReportBoundingBox), which is still a good thing.

Fixes: 551101c6 ("compositor-x11: Move synchronization to before-update")
Closes: #2880 (closed)

Edited by Daniel van Vugt

Merge request reports