egl/wayland: Update to per-surface frame events
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Wed, 16 Mar 2011 12:49:38 +0000 (13:49 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 12 Apr 2011 15:08:17 +0000 (11:08 -0400)
src/egl/drivers/dri2/platform_wayland.c
src/gallium/state_trackers/egl/wayland/native_wayland.c

index 6969c137da84e14cc74cdfab658d9a7f5c100ae6..0cc20bbc0bf3a07273fb12954b94b7b5c647c581 100644 (file)
@@ -429,7 +429,7 @@ wayland_create_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
 }
 
 static void
-wayland_frame_callback(void *data, uint32_t time)
+wayland_frame_callback(struct wl_surface *surface, void *data, uint32_t time)
 {
    struct dri2_egl_surface *dri2_surf = data;
 
@@ -459,7 +459,8 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
 
    dri2_surf->block_swap_buffers = EGL_TRUE;
    wl_display_frame_callback(dri2_dpy->wl_dpy->display,
-        wayland_frame_callback, dri2_surf);
+                            dri2_surf->wl_win->surface,
+                            wayland_frame_callback, dri2_surf);
 
    if (dri2_surf->type == DRI2_WINDOW_SURFACE) {
       pointer_swap(
index 068c3cd7c8e5f5b41fdc05a5ea156dc9e3708086..fd35b45373d47760ab2e03b4e3789940fb26874a 100644 (file)
@@ -280,7 +280,7 @@ wayland_surface_validate(struct native_surface *nsurf, uint attachment_mask,
 }
 
 static void
-wayland_frame_callback(void *data, uint32_t time)
+wayland_frame_callback(struct wl_surface *surf, void *data, uint32_t time)
 {
    struct wayland_surface *surface = data;
 
@@ -307,8 +307,8 @@ wayland_surface_swap_buffers(struct native_surface *nsurf)
       wl_display_iterate(display->dpy->display, WL_DISPLAY_READABLE);
 
    surface->block_swap_buffers = TRUE;
-   wl_display_frame_callback(display->dpy->display, wayland_frame_callback,
-                             surface);
+   wl_display_frame_callback(display->dpy->display, surface->win->surface,
+                             wayland_frame_callback, surface);
 
    if (surface->type == WL_WINDOW_SURFACE) {
       resource_surface_swap_buffers(surface->rsurf,