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>
Loading