egl/wayland: Dispatch the event queue before get_buffers
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 22 Nov 2012 13:34:49 +0000 (15:34 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 30 Nov 2012 22:05:50 +0000 (17:05 -0500)
commit60a11e295b86475ff334291a5b483e422371b21c
tree6d779b5a0c5d836ce73015f895125de9b0e81220
parent89ba4368fd86778405eea163e2b27812055f0df9
egl/wayland: Dispatch the event queue before get_buffers

When a client frame callback is executed and the client starts rendering
again, the egl event queue might not have been dispatched so that the
buffer release event for the previous frame hasn't been processed. In
that case a third buffer is allocated, even though it would be possible
to reuse the buffer that was just released.

The wl_display_dispatch_queue_pending() entry point is available from
wayland-client 1.0.2, so require that in configure.ac.  Also, just
let the pkg-config macro throw its own error, which will show what version
we were looking for and failed to find.

Note: This is a candidate for stable branches.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
configure.ac
src/egl/drivers/dri2/platform_wayland.c