mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 19:50:06 +01:00
present: disable page flip only when a slave crtc is active
This prevents the tearing of moving window in a composite WM
desktop when output slave is attached but none of its crtc is
really active.
[1.19: Also fix DMX_LIBS= in configure.ac so it still links - ajax]
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit bb9128fdc8)
This commit is contained in:
parent
1097bc9c18
commit
db1326cd66
2 changed files with 14 additions and 2 deletions
|
|
@ -2334,7 +2334,7 @@ if test "x$DMX" = xyes; then
|
|||
fi
|
||||
DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
|
||||
XDMX_CFLAGS="$DMXMODULES_CFLAGS"
|
||||
XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $RANDR_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
|
||||
XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $PRESENT_LIB $RANDR_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
|
||||
XDMX_SYS_LIBS="$DMXMODULES_LIBS"
|
||||
AC_SUBST([XDMX_CFLAGS])
|
||||
AC_SUBST([XDMX_LIBS])
|
||||
|
|
|
|||
|
|
@ -117,6 +117,18 @@ present_flip_pending_pixmap(ScreenPtr screen)
|
|||
return screen_priv->flip_pending->pixmap;
|
||||
}
|
||||
|
||||
static Bool
|
||||
present_check_output_slaves_active(ScreenPtr pScreen)
|
||||
{
|
||||
ScreenPtr pSlave;
|
||||
|
||||
xorg_list_for_each_entry(pSlave, &pScreen->slave_list, slave_head) {
|
||||
if (RRHasScanoutPixmap(pSlave))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
present_check_flip(RRCrtcPtr crtc,
|
||||
WindowPtr window,
|
||||
|
|
@ -145,7 +157,7 @@ present_check_flip(RRCrtcPtr crtc,
|
|||
return FALSE;
|
||||
|
||||
/* Fail to flip if we have slave outputs */
|
||||
if (screen->output_slaves)
|
||||
if (screen->output_slaves && present_check_output_slaves_active(screen))
|
||||
return FALSE;
|
||||
|
||||
/* Make sure the window hasn't been redirected with Composite */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue