[Xfce4-commits] [xfce/xfwm4] 01/01: compositor: remove old vblank code
noreply at xfce.org
noreply at xfce.org
Fri Jun 2 08:59:48 CEST 2017
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 b2c7463452de38e25e11cdb4fe2ce5faef9cc316
Author: Błażej Szczygieł <spaz16 at wp.pl>
Date: Thu Jun 1 21:06:42 2017 +0200
compositor: remove old vblank code
Bug: 13613
Since commit 7115d1b, we can't disable second (broken) vblank waiting
code.
glXSwapBuffers() already waits for v-blank (if enabled in driver), so
any other "synthetic" waiting for v-blank can reduce performance
(de-sync) without actual benefit.
This patch removes old code to prevent waiting for vblank twice.
---
src/compositor.c | 64 --------------------------------------------------------
src/screen.h | 3 ---
2 files changed, 67 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index dfc279d..aaaaa63 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1083,29 +1083,6 @@ check_glx_renderer (ScreenInfo *screen_info)
return TRUE;
}
-static void
-init_glx_extensions (ScreenInfo *screen_info)
-{
- g_return_if_fail (screen_info != NULL);
-
- TRACE ("entering init_glx_extensions");
-
- screen_info->has_glx_sync_control =
- epoxy_has_glx_extension (myScreenGetXDisplay (screen_info),
- screen_info->screen,
- "GLX_OML_sync_control");
-
- screen_info->has_glx_video_sync =
- epoxy_has_glx_extension (myScreenGetXDisplay (screen_info),
- screen_info->screen,
- "GLX_SGI_video_sync");
-
- screen_info->has_texture_from_pixmap =
- epoxy_has_glx_extension (myScreenGetXDisplay (screen_info),
- screen_info->screen,
- "GLX_EXT_texture_from_pixmap");
-}
-
static gboolean
check_gl_extensions (ScreenInfo *screen_info)
{
@@ -1325,17 +1302,6 @@ init_glx (ScreenInfo *screen_info)
return FALSE;
}
- init_glx_extensions (screen_info);
- if (!screen_info->has_glx_video_sync && !screen_info->has_glx_sync_control)
- {
- g_warning ("Screen is missing required GLX extension, vsync disabled.");
- /*
- * Strictly speaking, we /could/ be using GLX without VSync support, but what
- * would be the point? Chances are we'd be using swrast anyway...
- */
- return FALSE;
- }
-
if (!choose_glx_settings (screen_info))
{
g_warning ("Cannot find a matching GLX config, vsync disabled.");
@@ -1401,35 +1367,6 @@ init_glx (ScreenInfo *screen_info)
return TRUE;
}
-/* Following routine is taken from gdk GL context code by Alexander Larsson */
-static void
-wait_glx_vblank (ScreenInfo *screen_info)
-{
- guint32 current_count;
-
- g_return_if_fail (screen_info != NULL);
-
- TRACE ("entering wait_glx_vblank");
-
- if (screen_info->has_glx_sync_control)
- {
- gint64 ust, msc, sbc;
-
- glXGetSyncValuesOML (myScreenGetXDisplay (screen_info),
- screen_info->glx_window,
- &ust, &msc, &sbc);
- glXWaitForMscOML (myScreenGetXDisplay (screen_info),
- screen_info->glx_window,
- 0, 2, (msc + 1) % 2,
- &ust, &msc, &sbc);
- }
- else if (screen_info->has_glx_video_sync)
- {
- glXGetVideoSyncSGI (¤t_count);
- glXWaitVideoSyncSGI (2, (current_count + 1) % 2, ¤t_count);
- }
-}
-
static GLXDrawable
create_glx_drawable (ScreenInfo *screen_info, Pixmap pixmap)
{
@@ -2225,7 +2162,6 @@ paint_all (ScreenInfo *screen_info, XserverRegion region, gushort buffer)
if (screen_info->use_glx) /* glx first if available */
{
glXWaitX ();
- wait_glx_vblank (screen_info);
bind_glx_texture (screen_info,
screen_info->rootPixmap[buffer]);
redraw_glx_texture (screen_info);
diff --git a/src/screen.h b/src/screen.h
index 1309092..e29f4e9 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -207,9 +207,6 @@ struct _ScreenInfo
gboolean use_present;
#ifdef HAVE_EPOXY
- gboolean has_glx_sync_control;
- gboolean has_glx_video_sync;
- gboolean has_texture_from_pixmap;
gboolean texture_inverted;
GLuint rootTexture;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list