egl/wayland: Update to buffer.damage addition
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Mon, 7 Mar 2011 14:06:31 +0000 (15:06 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 22 Apr 2011 16:21:37 +0000 (12:21 -0400)
src/egl/drivers/dri2/platform_wayland.c
src/egl/wayland/wayland-drm/wayland-drm.c
src/gallium/state_trackers/egl/wayland/native_wayland.c

index c0860a737789a672f0917dff1ef4ebe004edec9b..030c68777af1611cd8b27b31898246589256f344 100644 (file)
@@ -488,6 +488,8 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
                  dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT],
                  dri2_surf->wl_win->visual);
 
+      wl_buffer_damage(dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT], 0, 0,
+                      dri2_surf->base.Width, dri2_surf->base.Height);
       wl_surface_attach(dri2_surf->wl_win->surface,
            dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
            dri2_surf->dx, dri2_surf->dy);
index 5cf166f3130c9e365a18128f63180710eb9bcd55..149583b1169d7661a285ff32a4f00a396c658b22 100644 (file)
@@ -51,9 +51,8 @@ struct wl_drm {
 };
 
 static void
-drm_buffer_damage(struct wl_buffer *buffer_base,
-                 struct wl_surface *surface,
-                 int32_t x, int32_t y, int32_t width, int32_t height)
+buffer_damage(struct wl_client *client, struct wl_buffer *buffer,
+             int32_t x, int32_t y, int32_t width, int32_t height)
 {
 }
 
@@ -74,6 +73,7 @@ buffer_destroy(struct wl_client *client, struct wl_buffer *buffer)
 }
 
 const static struct wl_buffer_interface buffer_interface = {
+       buffer_damage,
        buffer_destroy
 };
 
@@ -104,7 +104,6 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
        buffer->buffer.height = height;
        buffer->buffer.visual = visual;
        buffer->buffer.attach = NULL;
-       buffer->buffer.damage = drm_buffer_damage;
 
        if (visual->object.interface != &wl_visual_interface) {
                /* FIXME: Define a real exception event instead of
index 236bad9afbf0622d636e78c32bc7a3be68f6ec03..b9cf8c48f1ed7c236b587fb548416193665a7fe8 100644 (file)
@@ -380,6 +380,7 @@ wayland_surface_present(struct native_surface *nsurf,
 
    if (surface->type == WL_WINDOW_SURFACE) {
       resource_surface_get_size(surface->rsurf, &width, &height);
+      wl_buffer_damage(surface->buffer[WL_BUFFER_FRONT], 0, 0, width, height);
       wl_surface_damage(surface->win->surface, 0, 0, width, height);
    }