Redesign the compositor / server interface.

This lets the compositor directly provide the implementation of the RMI
objects for the surface object and a new compositor object.  We avoid the
manual forwarding of requests into the compositor and the clumsy compositor
interface struct.
This commit is contained in:
Kristian Høgsberg 2008-12-15 20:35:24 -05:00
parent 0ea4710b3d
commit d2412e2c2e
9 changed files with 286 additions and 342 deletions

View file

@ -47,6 +47,7 @@ struct gears {
struct window *window;
struct wl_display *wl_display;
struct wl_compositor *compositor;
struct rectangle rectangle;
EGLDisplay display;
@ -320,7 +321,7 @@ frame_handler(struct window *window, uint32_t frame, uint32_t timestamp, void *d
&gears->rectangle,
gears->buffer->name, gears->buffer->stride);
wl_display_commit(gears->wl_display, 0);
wl_compositor_commit(gears->compositor, 0);
gears->angle += 1;
}
@ -379,6 +380,8 @@ gears_create(struct wl_display *display, int fd)
glEnable(GL_DEPTH_TEST);
glClearColor(0, 0, 0, 0.92);
gears->compositor = wl_display_get_compositor(display);
draw_gears(gears);
frame_handler(gears->window, 0, 0, gears);