summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-03-07 15:06:31 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-03-22 11:50:45 +0100
commit1e87010ab4e491d0d85bdbbf7e3d64c1b009df43 (patch)
tree73c47ae7f1e472b4c085032316b2adb13b6d2ba0
parente4b040c2b922ff1887651cbf658b06b48b5992c5 (diff)
egl/wayland: Update to buffer.damage addition
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c2
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c7
-rw-r--r--src/gallium/state_trackers/egl/wayland/native_wayland.c1
3 files changed, 6 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 6ae3f6554b..c290aa9593 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -479,6 +479,8 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
wayland_create_buffer(dri2_surf,
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]);
+ 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);
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index 6624fbe9d4..7adcc5189c 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -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
diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.c b/src/gallium/state_trackers/egl/wayland/native_wayland.c
index 068c3cd7c8..ae453ea0c4 100644
--- a/src/gallium/state_trackers/egl/wayland/native_wayland.c
+++ b/src/gallium/state_trackers/egl/wayland/native_wayland.c
@@ -364,6 +364,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);
}