[Xfce4-commits] [xfce/xfwm4] 01/01: compositor: Revert to GLX as default vblank method (again)
noreply at xfce.org
noreply at xfce.org
Fri Apr 26 20:56:58 CEST 2019
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit e07574d6e7a2dbaa08c3ba4765c6306073d9493e
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Fri Apr 26 20:47:11 2019 +0200
compositor: Revert to GLX as default vblank method (again)
Bug: 15325
Although XPresent would be the most sensible choice for a lightweight
vblank method, it's still quite fragile and currently broken with
modesettings driver on Xorg 1.20.
GLX seems to work reasonably well on a wide range of hardware and driver
(including closed source drivers) and does not suffer from the lock ups
XPresent may cause on some kernel/driver.
Revert the default vblank method (auto) to GLX for now.
See-also: https://gitlab.freedesktop.org/xorg/xserver/issues/68
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/compositor.c | 41 ++++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 68eb787..b86e9da 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4388,28 +4388,13 @@ compositorManageScreen (ScreenInfo *screen_info)
XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
TRACE ("manual compositing enabled");
-#ifdef HAVE_PRESENT_EXTENSION
- screen_info->use_present = display_info->have_present &&
- (screen_info->vblank_mode == VBLANK_AUTO ||
- screen_info->vblank_mode == VBLANK_XPRESENT);
- if (screen_info->use_present)
- {
- screen_info->present_pending = FALSE;
- XPresentSelectInput (display_info->dpy,
- screen_info->output,
- PresentCompleteNotifyMask);
- }
-#else /* HAVE_PRESENT_EXTENSION */
- screen_info->use_present = FALSE;
-#endif /* HAVE_PRESENT_EXTENSION */
-
#ifdef HAVE_EPOXY
- screen_info->use_glx = !screen_info->use_present &&
+ screen_info->use_glx = (screen_info->vblank_mode == VBLANK_AUTO ||
+ screen_info->vblank_mode == VBLANK_GLX);
#ifdef HAVE_XSYNC
- display_info->have_xsync &&
+ screen_info->use_glx &= display_info->have_xsync;
#endif /* HAVE_XSYNC */
- (screen_info->vblank_mode == VBLANK_AUTO ||
- screen_info->vblank_mode == VBLANK_GLX);
+
if (screen_info->use_glx)
{
screen_info->glx_context = None;
@@ -4426,6 +4411,24 @@ compositorManageScreen (ScreenInfo *screen_info)
screen_info->use_glx = FALSE;
#endif /* HAVE_EPOXY */
+#ifdef HAVE_PRESENT_EXTENSION
+ screen_info->use_present = display_info->have_present &&
+#ifdef HAVE_EPOXY
+ !screen_info->use_glx &&
+#endif /* HAVE_EPOXY */
+ (screen_info->vblank_mode == VBLANK_AUTO ||
+ screen_info->vblank_mode == VBLANK_XPRESENT);
+ if (screen_info->use_present)
+ {
+ screen_info->present_pending = FALSE;
+ XPresentSelectInput (display_info->dpy,
+ screen_info->output,
+ PresentCompleteNotifyMask);
+ }
+#else /* HAVE_PRESENT_EXTENSION */
+ screen_info->use_present = FALSE;
+#endif /* HAVE_PRESENT_EXTENSION */
+
if (screen_info->use_present)
{
g_info ("Compositor using XPresent for vsync");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list