Fix jerky animations for the XRender backend

The code controlling timing for the animations
assumes that all painting is finished when the
Scene has finished painting. Since the X protocol
is asyncronous we need to call XSync (and not XFlush)
to make sure all painting has finished.
Tested for more than 2 weeks without issues.

NB: This is the same commit as
d0cf7ff6da4c6f8bcc684dd6378e2af09d36bb06
due to style changes in kwin code I could not cherry-pick
it cleanly
This commit is contained in:
Jacopo De Simoi 2011-03-15 22:17:26 +01:00
parent fef3ee0ec6
commit 82150abeb3

View file

@ -291,11 +291,11 @@ void SceneXrender::flushBuffer(int mask, QRegion damage)
XFixesSetPictureClipRegion(display(), buffer, 0, 0, None);
XRenderComposite(display(), PictOpSrc, buffer, None, front, 0, 0, 0, 0, 0, 0, displayWidth(), displayHeight());
XFixesSetPictureClipRegion(display(), front, 0, 0, None);
XFlush(display());
XSync(display(), false);
} else {
// copy composed buffer to the root window
XRenderComposite(display(), PictOpSrc, buffer, None, front, 0, 0, 0, 0, 0, 0, displayWidth(), displayHeight());
XFlush(display());
XSync(display(), false);
}
}