-
Daniel Stone authored
The eglut_wayland event loop attempted to use frame events to drive the redraw loop. However, the frame events were being requested after eglSwapBuffers (i.e. wl_surface_commit()), which means they would not actually activate until the next eglSwapBuffers. This was being balanced out by 'redisplay' being set immediately by es2gears, which would do an instant-return poll before calling eglSwapBuffers, which would internally wait on its own frame event, and as a side effect trigger the frame event that eglut_wayland had just placed, causing redraw to be called again. The result would be a stuttering 40fps. Rewrite the event loop, so that: - frame events are placed before eglSwapBuffers is called - 'redisplay' no longer triggers an immediate return from poll - the frame event handler redraws if redisplay is requested, and exits if not - if redisplay is requested whilst we do not have a pending frame event, redraw instantly Reported-by: Daniel van Vugt <daniel.van.vugt@canonical.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101814
c539078c
Loading