mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
b34034217a
It seems like it would be quite a reasonable design for an application to immediately paint the buffer and call swap_buffers within the handler for the sync event. This previously wouldn't work. When using the GLX winsys if swap_region is called then it immediately tries to set the pending notification flag. However if this is called from the event callback then when the callback is complete it will clear the flag again and the pending notification will be lost. This patch just makes it clear the pending flag before invoking the callback so that it can be safely queued again. With any winsys that doesn't directly handle the sync event notification it would almost work except that it was iterating the live list of pending events. If the callback causes another event to be added to this list by issuing a buffer swap then the iteration would never complete and cogl_poll_dispatch would never return. This patch just makes it steal the list before iterating so that any additions will be dispatched by a later call to cogl_poll_dispatch instead. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 2263b31594900b73900d2ce22cf70c68e7e793c6) |
||
---|---|---|
.. | ||
cogl-texture-pixmap-x11-private.h | ||
cogl-texture-pixmap-x11.c | ||
cogl-texture-pixmap-x11.h | ||
cogl-winsys-egl-android-private.h | ||
cogl-winsys-egl-android.c | ||
cogl-winsys-egl-feature-functions.h | ||
cogl-winsys-egl-gdl-private.h | ||
cogl-winsys-egl-gdl.c | ||
cogl-winsys-egl-kms-private.h | ||
cogl-winsys-egl-kms.c | ||
cogl-winsys-egl-null-private.h | ||
cogl-winsys-egl-null.c | ||
cogl-winsys-egl-private.h | ||
cogl-winsys-egl-wayland-private.h | ||
cogl-winsys-egl-wayland.c | ||
cogl-winsys-egl-x11-private.h | ||
cogl-winsys-egl-x11.c | ||
cogl-winsys-egl.c | ||
cogl-winsys-glx-feature-functions.h | ||
cogl-winsys-glx-private.h | ||
cogl-winsys-glx.c | ||
cogl-winsys-private.h | ||
cogl-winsys-sdl2.c | ||
cogl-winsys-sdl-private.h | ||
cogl-winsys-sdl.c | ||
cogl-winsys-stub-private.h | ||
cogl-winsys-stub.c | ||
cogl-winsys-wgl-feature-functions.h | ||
cogl-winsys-wgl-private.h | ||
cogl-winsys-wgl.c | ||
cogl-winsys.c |