diff options
author | marha <marha@users.sourceforge.net> | 2014-08-11 21:22:25 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-08-11 21:22:25 +0200 |
commit | 8e27619ab489dece35cc4bec86950ee7729cd309 (patch) | |
tree | ab59dbc661e00c12ed4777cf9d0d37393c4163aa /xorg-server/present | |
parent | ffc99ce2402fe5c9a6eb8fcf193e8e9472fd993b (diff) | |
parent | fdbedba4d50e1b28b0249c83ba11c029f096e400 (diff) | |
download | vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.gz vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.bz2 vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libxcb/src/c_client.py
mesalib/include/GL/glext.h
mesalib/include/GL/glxext.h
mesalib/src/glsl/.gitignore
mesalib/src/mesa/drivers/dri/common/xmlconfig.h
mesalib/src/mesa/main/.gitignore
xorg-server/Xext/xvmain.c
xorg-server/dix/dispatch.c
xorg-server/hw/xfree86/common/compiler.h
Diffstat (limited to 'xorg-server/present')
-rw-r--r-- | xorg-server/present/present.c | 21 | ||||
-rw-r--r-- | xorg-server/present/present_priv.h | 2 | ||||
-rw-r--r-- | xorg-server/present/present_screen.c | 1 |
3 files changed, 16 insertions, 8 deletions
diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c index 6528bd231..c0b83f705 100644 --- a/xorg-server/present/present.c +++ b/xorg-server/present/present.c @@ -291,14 +291,18 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc if (crtc != window_priv->crtc) { uint64_t old_ust, old_msc; - /* The old CRTC may have been turned off, in which case - * we'll just use whatever previous MSC we'd seen from this CRTC - */ + if (window_priv->crtc == PresentCrtcNeverSet) { + window_priv->msc_offset = 0; + } else { + /* The old CRTC may have been turned off, in which case + * we'll 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) - old_msc = window_priv->msc; + if (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; + window_priv->msc_offset += new_msc - old_msc; + } window_priv->crtc = crtc; } @@ -395,7 +399,8 @@ present_set_abort_flip(ScreenPtr screen) present_set_tree_pixmap(screen_priv->flip_window, (*screen->GetScreenPixmap)(screen)); - present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen)); + if (screen->root) + present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen)); screen_priv->flip_pending->abort_flip = TRUE; } @@ -725,7 +730,7 @@ present_pixmap(WindowPtr window, if (!pixmap) target_crtc = window_priv->crtc; - if (!target_crtc) + if (!target_crtc || target_crtc == PresentCrtcNeverSet) target_crtc = present_get_crtc(window); } diff --git a/xorg-server/present/present_priv.h b/xorg-server/present/present_priv.h index d8569a2b6..f5c1652d1 100644 --- a/xorg-server/present/present_priv.h +++ b/xorg-server/present/present_priv.h @@ -134,6 +134,8 @@ typedef struct present_window_priv { struct xorg_list notifies; } present_window_priv_rec, *present_window_priv_ptr; +#define PresentCrtcNeverSet ((RRCrtcPtr) 1) + extern DevPrivateKeyRec present_window_private_key; static inline present_window_priv_ptr diff --git a/xorg-server/present/present_screen.c b/xorg-server/present/present_screen.c index 1e4f55d37..7bfebf1d2 100644 --- a/xorg-server/present/present_screen.c +++ b/xorg-server/present/present_screen.c @@ -45,6 +45,7 @@ present_get_window_priv(WindowPtr window, Bool create) return NULL; xorg_list_init(&window_priv->vblank); xorg_list_init(&window_priv->notifies); + window_priv->crtc = PresentCrtcNeverSet; dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv); return window_priv; } |