1
0
Fork 0
mutter-performance-source/cogl/winsys
Neil Roberts b3cc4d26d9 wayland: Send COGL_FRAME_EVENT_SYNC based on the frame callback
Instead of queuing the frame sync event immediately after a swap, the
Wayland winsys now installs a frame callback and queues the event when
Wayland reports that the frame is complete. It also reports the
COGL_FRAME_EVENT_COMPLETE event at the same time because there is no
more information we can give.

This patch is a bit of a divergence from how the events are handled in
the GLX winsys. Instead of installing its own idle function, the
_cogl_onscreen_queue_event() function has now been made non-static so
that it can be used by the Wayland winsys. The frame callback now just
queues an event using that. The pending_frame_infos queue on the
CoglOnscreen isn't used and instead the CoglFrameInfo is immediately
popped off the queue so that it can be stored as part of the closure
data when the frame callback is set up. That way it would use the
right frame info even if somehow the Wayland callbacks were invoked in
the wrong order and the code is a bit simpler.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit f7ea370a0d5013c9f0263f37c7f892adc8a2f087)
2013-07-11 14:22:12 +01:00
..
cogl-texture-pixmap-x11-private.h texture: add width/height members to base CoglTexture 2013-01-22 17:48:17 +00:00
cogl-texture-pixmap-x11.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-pixmap-x11.h Fixes for --disable-glib 2013-01-22 17:48:05 +00:00
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 check the wayland buffer format when creating texture 2013-05-29 19:30:44 +01:00
cogl-winsys-egl-gdl-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-gdl.c Adds CoglError api 2013-01-22 17:47:39 +00:00
cogl-winsys-egl-kms-private.h egl: Split out the KMS winsys as overrides of the EGL winsys 2011-12-09 17:29:49 +00:00
cogl-winsys-egl-kms.c poll: Add general way to hook into mainloop without fd 2013-05-28 21:36:03 +01:00
cogl-winsys-egl-null-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-null.c Adds CoglError api 2013-01-22 17:47:39 +00:00
cogl-winsys-egl-private.h check the wayland buffer format when creating texture 2013-05-29 19:30:44 +01:00
cogl-winsys-egl-wayland-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-wayland.c wayland: Send COGL_FRAME_EVENT_SYNC based on the frame callback 2013-07-11 14:22:12 +01:00
cogl-winsys-egl-x11-private.h Rename the EGL_X11 winsys to EGL_XLIB 2011-12-14 16:40:26 +00:00
cogl-winsys-egl-x11.c egl-x11: Fix a crash when the app has non-Cogl windows 2013-06-21 14:13:09 +01:00
cogl-winsys-egl.c Fix a warning in the EGL winsys 2013-05-30 13:59:13 +01: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 Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-glx.c Add a callback to get dirty events from a CoglOnscreen 2013-05-30 13:42:56 +01:00
cogl-winsys-private.h Add fence API 2013-05-28 21:36:03 +01:00
cogl-winsys-sdl-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-sdl.c Add a callback to get dirty events from a CoglOnscreen 2013-05-30 13:42:56 +01:00
cogl-winsys-sdl2.c Add a callback to get dirty events from a CoglOnscreen 2013-05-30 13:42:56 +01:00
cogl-winsys-stub-private.h Make stub winsys into a proper winsys backend 2011-06-01 20:44:41 +01:00
cogl-winsys-stub.c onscreen: Adds swap_buffers_with_damage api 2013-04-30 16:39:31 +01:00
cogl-winsys-wgl-feature-functions.h Add a WGL winsys 2011-05-10 17:58:41 +01:00
cogl-winsys-wgl-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-wgl.c Add a callback to get dirty events from a CoglOnscreen 2013-05-30 13:42:56 +01:00
cogl-winsys.c Adds CoglError api 2013-01-22 17:47:39 +00:00