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
remotes/origin/Plasma/5.0
Jacopo De Simoi 15 years ago
parent fef3ee0ec6
commit 82150abeb3
  1. 4
      scene_xrender.cpp

@ -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);
}
}

Loading…
Cancel
Save