diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-11-28 17:06:06 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-11-28 17:06:10 -0500 |
commit | fbdbbdc153bf7f6ed22f1b9cb0be73b66e87a3e7 (patch) | |
tree | 8911231df0f5a2620aa97595efdecb7deb264fa2 /wayland.h | |
parent | 44f36e3585cf7bb1ba8e73febabb7facf5cd6151 (diff) | |
download | wayland-fbdbbdc153bf7f6ed22f1b9cb0be73b66e87a3e7.tar.gz wayland-fbdbbdc153bf7f6ed22f1b9cb0be73b66e87a3e7.tar.xz wayland-fbdbbdc153bf7f6ed22f1b9cb0be73b66e87a3e7.zip |
Finally implement the commit/ack/frame protocol and improve repaint loop.
This implements the commit/ack/frame protocol that let clients batch up
a series of requests and then commit them atomically using the commit request.
The commit requests generats two following events: the acknowledge event,
which lets the client know that the server has received the request and
which frame the rendering has been scheduled for. At this point the client
can start rendering the next frame or free up temporary buffers. Then when
the compositor finally makes the newly composited frame visible on screen
the server sends a frame event, which contains the number of the frame that
was presented and the time when it happened.
The window and flower clients have been updated to use these two events in
their main loops and everything now updates per frame. The EGL compositor
repaint loop has been tweaked to delay the compositing of the screen to
10ms after last swapbuffer completed so as to allow processing as many
requests as possible before blocking on the next vertical retrace.
Diffstat (limited to 'wayland.h')
-rw-r--r-- | wayland.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -110,7 +110,8 @@ void wl_display_post_key_event(struct wl_display *display, struct wl_object *source, int key, int state); void -wl_display_post_acknowledge(struct wl_display *display); +wl_display_post_frame(struct wl_display *display, + uint32_t frame, uint32_t msecs); struct wl_compositor { const struct wl_compositor_interface *interface; @@ -139,6 +140,7 @@ struct wl_compositor_interface { struct wl_surface *surface, int32_t x, int32_t y, int32_t width, int32_t height); + uint32_t (*notify_commit)(struct wl_compositor *compositor); void (*notify_pointer_motion)(struct wl_compositor *compositor, struct wl_object *source, int32_t x, int32_t y); |