Diffusion KWin a039f3ba80ab

[wayland] Send correct current time in the frame callback

Authored by zzag on Feb 1 2019, 9:39 PM.

Description

[wayland] Send correct current time in the frame callback

Summary:
Currently, each frame callback sent by KWin has the current time in
nanoseconds, but the protocol spec states that we have to send the time
in milliseconds. This is the reason why animations that are driven by
frame callbacks are too fast.

In addition to that, m_timeSinceStart isn't actually "time since start,"
it's rather accumulated duration of all painting cycles. If there is
something to draw and it takes quite a while to compose the scene, maybe
m_timeSinceStart will be close enough to the current time. So, it has
been replaced with QElapsedTimer, this makes the current time correct
and also simplifies code a little bit.

Test Plan: The triangle in weston-subsurfaces no longer spins very fast.

Reviewers: KWin, romangg

Reviewed By: KWin, romangg

Subscribers: romangg, kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D18656

Details

Committed
zzagFeb 26 2019, 10:03 AM
Reviewer
KWin
Differential Revision
D18656: [wayland] Send correct current time in the frame callback
Parents
R108:dffd9777c744: [libkwineffects] Make AnimationEffect::AniMap protected
Branches
Unknown
Tags
Unknown