Mesa (master): egl/wayland: Update to per-surface frame events
Kristian Høgsberg
krh at kemper.freedesktop.org
Tue Apr 12 15:16:28 UTC 2011
Module: Mesa
Branch: master
Commit: f05751aa2af1a8ec83c2d110385aab1b7e735238
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f05751aa2af1a8ec83c2d110385aab1b7e735238
Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date: Wed Mar 16 13:49:38 2011 +0100
egl/wayland: Update to per-surface frame events
---
src/egl/drivers/dri2/platform_wayland.c | 5 +++--
.../state_trackers/egl/wayland/native_wayland.c | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 6969c13..0cc20bb 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -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(
diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.c b/src/gallium/state_trackers/egl/wayland/native_wayland.c
index 068c3cd..fd35b45 100644
--- a/src/gallium/state_trackers/egl/wayland/native_wayland.c
+++ b/src/gallium/state_trackers/egl/wayland/native_wayland.c
@@ -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,
More information about the mesa-commit
mailing list