[RFC weston] Change usage of wl_buffer to correspond to changes in libwayland
Jason Ekstrand
jason at jlekstrand.net
Tue Mar 19 12:18:07 PDT 2013
---
src/compositor.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index b734f67..305efe0 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1060,7 +1060,7 @@ weston_buffer_reference_handle_destroy(struct wl_listener *listener,
container_of(listener, struct weston_buffer_reference,
destroy_listener);
- assert((struct wl_buffer *)data == ref->buffer);
+ assert(wl_resource_get_user_data(data) == ref->buffer);
ref->buffer = NULL;
}
@@ -1071,8 +1071,8 @@ weston_buffer_reference(struct weston_buffer_reference *ref,
if (ref->buffer && buffer != ref->buffer) {
ref->buffer->busy_count--;
if (ref->buffer->busy_count == 0) {
- assert(ref->buffer->resource.client != NULL);
- wl_resource_queue_event(&ref->buffer->resource,
+ assert(ref->buffer->resource != NULL);
+ wl_resource_queue_event(ref->buffer->resource,
WL_BUFFER_RELEASE);
}
wl_list_remove(&ref->destroy_listener.link);
@@ -1080,8 +1080,8 @@ weston_buffer_reference(struct weston_buffer_reference *ref,
if (buffer && buffer != ref->buffer) {
buffer->busy_count++;
- wl_signal_add(&buffer->resource.destroy_signal,
- &ref->destroy_listener);
+ wl_resource_add_destroy_listener(buffer->resource,
+ &ref->destroy_listener);
}
ref->buffer = buffer;
@@ -1378,8 +1378,8 @@ surface_attach(struct wl_client *client,
surface->pending.buffer = buffer;
surface->pending.newly_attached = 1;
if (buffer) {
- wl_signal_add(&buffer->resource.destroy_signal,
- &surface->pending.buffer_destroy_listener);
+ wl_resource_add_destroy_listener(buffer->resource,
+ &surface->pending.buffer_destroy_listener);
}
}
--
1.8.1.4
More information about the wayland-devel
mailing list