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.
This commit is contained in:
Kristian Høgsberg 2008-11-28 17:06:06 -05:00
parent 44f36e3585
commit fbdbbdc153
6 changed files with 165 additions and 90 deletions

View file

@ -104,7 +104,7 @@ event_handler(struct wl_display *display,
uint32_t object, uint32_t opcode,
uint32_t size, uint32_t *p, void *data)
{
if (object == 1)
if (object == 1 && opcode == 4)
move_flower(data);
}