mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 03:40:13 +01:00
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>
This commit is contained in:
parent
d7297b0044
commit
22285a6f1c
1 changed files with 1 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue