summaryrefslogtreecommitdiff
path: root/src/screen.h
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2019-05-14 23:14:07 +0200
committerOlivier Fourdan <fourdan@xfce.org>2019-05-15 21:35:15 +0200
commit340f9e8275aac21944a7882a76c84593aa156aa1 (patch)
tree90ec542b085e8d5d7fa683a67ad210c628bbb58c /src/screen.h
parentc8f624c742ab2bbebaae01c85d87e5fbdf0bc9b1 (diff)
downloadxfwm4-340f9e8275aac21944a7882a76c84593aa156aa1.tar.gz
compositor: Finer fence control
Basically, we want the fence to prevent GL from accessing the pixmap buffer until its update is complete. However, depending on the code path, we may update the buffer more than once, so to prevent any flickering, we need a finer grain control over the fence operations. Split the fence support into different actions as we need them, i.e. create, destroy, reset, trigger and wait. Make sure we reset the fence before each time we are to update the pixmap buffer and wait for the fence just before doing the GL swap. Also create a different fence for each buffer, so if ever decide to use multiple buffers with GL, the existing code will be able to support that and not use the same fence for multiple pixmaps. Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Diffstat (limited to 'src/screen.h')
-rw-r--r--src/screen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screen.h b/src/screen.h
index 60490f3b8..0370ed6a4 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -227,7 +227,7 @@ struct _ScreenInfo
GLXContext glx_context;
GLXWindow glx_window;
#ifdef HAVE_XSYNC
- XSyncFence fence;
+ XSyncFence fence[2];
#endif /* HAVE_XSYNC */
#endif /* HAVE_EPOXY */