xwayland/eglstream: flush stream after eglSwapBuffers

When eglSwapBuffers inserts a new frame into a window's stream, there may be a
delay before the state of the consumer end of the stream is updated to reflect
this. If the subsequent wl_surface_attach, wl_surface_damage, wl_surface_commit
calls are received by the compositor before then, it will (typically) re-use
the previous frame acquired from the stream instead of the latest one.

This can leave the window displaying out-of-date contents, which might never be
updated thereafter.

To fix this, after calling eglSwapBuffers, xwl_glamor_eglstream_post_damage
should call eglStreamFlushNV. This call will block until it can be guaranteed
that the state of the consumer end of the stream has been updated to reflect
that a new frame is available.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
5 jobs for xwayland-eglstream-glx in 2 minutes and 5 seconds
Status Name Job ID Coverage
  Docker Image
passed debian-buster #9669846

00:00:11

 
  Build And Test
failed autotools #9669847

00:01:54

failed meson #9669848

00:01:24

failed meson-noglamor #9669849

00:01:20

passed mingw-cross-build #9669850

00:01:33

 
Name Stage Failure
failed
autotools Build And Test
files in cache                     88892
cache size 4.4 GB
max cache size 5.0 GB
Uploading artifacts for failed job
Uploading artifacts...
WARNING: build/test/piglit-results/: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
meson-noglamor Build And Test
files in cache                     91801
cache size 4.5 GB
max cache size 5.0 GB
Uploading artifacts for failed job
Uploading artifacts...
WARNING: build/test/piglit-results/: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
meson Build And Test
files in cache                     88537
cache size 4.4 GB
max cache size 5.0 GB
Uploading artifacts for failed job
Uploading artifacts...
WARNING: build/test/piglit-results/: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1