mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
present: fix msc offset calculation in screen mode
Instead of getting the current msc value from the window crtc, which not exist take the last saved msc value saved in the window_priv struct Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
This commit is contained in:
committed by
Povilas Kanapickas
parent
908deb0895
commit
d2dce22b67
@@ -634,8 +634,9 @@ present_scmd_update_window_crtc(WindowPtr window, RRCrtcPtr crtc, uint64_t new_m
|
||||
return;
|
||||
}
|
||||
|
||||
/* Crtc may have been turned off, just use whatever previous MSC we'd seen from this CRTC. */
|
||||
if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
|
||||
/* Crtc may have been turned off or be destroyed, just use whatever previous MSC we'd seen from this CRTC. */
|
||||
if (!RRCrtcExists(window->drawable.pScreen, window_priv->crtc) ||
|
||||
present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
|
||||
old_msc = window_priv->msc;
|
||||
|
||||
window_priv->msc_offset += new_msc - old_msc;
|
||||
|
||||
Reference in New Issue
Block a user