Buffer release events (was: Add support for eglSwapInterval)
davy at clipper.ens.fr
Thu Oct 24 13:13:48 CEST 2013
On Wed, 23 Oct 2013, Jason Ekstrand wrote:
> There may also be a way that we can sidestep the whole issue. (I suggested
> this to Axel Davy [mannerov] and it worked for him in his wlglamor DDX.)
> The solution is to send a
> wl_display.sync request immediately after the commit. This will force any
> queued wl_buffer.release events to get sent out immediately. The client can
> even destroy the returned proxy immediately and completely ignore the
> resulting event. This seems a bit hackish, but this is exactly the kind of
> thing the sync request is intended for: flushing the stream.
Well I can give my feedback about it:
I send a dummy sync request after the commit, and I don't have to care
about it. I don't even test if the sync callback was called.
I don't need to use dummy frame listeners, and using the dummy sync
request solves the issues in all the cases. When the application is
fullscreen and the buffers are used as scanout, I don't have any issue
too with release events.
I'm not sure however this is the best way to solve the issue. As
mentionned by Jason, this can be used as a fallback for a compositor not
supporting your new wl_surface extension.
More information about the wayland-devel