mutter/cogl/winsys
Neil Roberts b34034217a Make it possible to call swap_buffers within a frame event callback
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)
2013-02-03 10:07:47 +01:00
..
cogl-texture-pixmap-x11-private.h
cogl-texture-pixmap-x11.c
cogl-texture-pixmap-x11.h
cogl-winsys-egl-android-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-android.c Adds CoglError api 2013-01-22 17:47:39 +00:00
cogl-winsys-egl-feature-functions.h egl: support EGL_EXT_buffer_age 2013-01-23 17:58:20 +00:00
cogl-winsys-egl-gdl-private.h
cogl-winsys-egl-gdl.c Adds CoglError api 2013-01-22 17:47:39 +00:00
cogl-winsys-egl-kms-private.h
cogl-winsys-egl-kms.c onscreen: Add CoglFrameInfo and _add_frame_callback() api 2013-01-30 20:09:49 +00:00
cogl-winsys-egl-null-private.h
cogl-winsys-egl-null.c
cogl-winsys-egl-private.h egl: support EGL_EXT_buffer_age 2013-01-23 17:58:20 +00:00
cogl-winsys-egl-wayland-private.h
cogl-winsys-egl-wayland.c
cogl-winsys-egl-x11-private.h
cogl-winsys-egl-x11.c texture: add width/height members to base CoglTexture 2013-01-22 17:48:17 +00:00
cogl-winsys-egl.c Bind the dummy surface or drawable when current onscreen is destroyed 2013-01-25 18:21:09 +00:00
cogl-winsys-glx-feature-functions.h onscreen: Add CoglFrameInfo and _add_frame_callback() api 2013-01-30 20:09:49 +00:00
cogl-winsys-glx-private.h
cogl-winsys-glx.c Make it possible to call swap_buffers within a frame event callback 2013-02-03 10:07:47 +01:00
cogl-winsys-private.h Add cogl_get_clock_time() 2013-01-30 20:09:49 +00:00
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 Add a GL 3 driver 2013-01-22 17:48:01 +00:00
cogl-winsys.c