summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2018-04-20 17:10:06 +0200
committerAdam Jackson <ajax@redhat.com>2018-05-02 14:55:48 -0400
commit22285a6f1c5fa6ba22f4214c4ccc09e27d1925f6 (patch)
treeda1ba12166bd2b0941f40aea499c86f434c648c4
parentd7297b00444b0e2cd936fbfb08206a575ab8c29d (diff)
present: fix msc offset calculation in window mode
Instead of getting the current msc value from the window, which might be different to old one directly take the last saved msc value saved in the window_priv struct. Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--present/present_wnmd.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/present/present_wnmd.c b/present/present_wnmd.c
index 72bda2fbf..80ffb014e 100644
--- a/present/present_wnmd.c
+++ b/present/present_wnmd.c
@@ -518,8 +518,6 @@ present_wnmd_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t windo
present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE);
if (crtc != window_priv->crtc) {
- uint64_t old_ust, old_msc;
-
if (window_priv->crtc == PresentCrtcNeverSet) {
window_priv->msc_offset = 0;
} else {
@@ -527,10 +525,7 @@ present_wnmd_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t windo
* we'll just use whatever previous MSC we'd seen from this CRTC
*/
- if (present_wnmd_get_ust_msc(window->drawable.pScreen, window, &old_ust, &old_msc) != Success)
- old_msc = window_priv->msc;
-
- window_priv->msc_offset += new_msc - old_msc;
+ window_priv->msc_offset += new_msc - window_priv->msc;
}
window_priv->crtc = crtc;
}