summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-08-15 15:17:57 -0700
committerKristian Høgsberg <krh@bitplanet.net>2013-08-20 16:11:09 -0700
commit8ab98d5bfa2acd212376ba88c2c6a879d60f1607 (patch)
treeb875925d5a28b788e81ac21924b5963700c12501
parent55dada280cf18792cd7950c6f93602e80e2a0d77 (diff)
downloadweston-8ab98d5bfa2acd212376ba88c2c6a879d60f1607.tar.gz
weston-8ab98d5bfa2acd212376ba88c2c6a879d60f1607.tar.bz2
weston-8ab98d5bfa2acd212376ba88c2c6a879d60f1607.zip
nested: The wl_resouce is the buffer, not the wl_resource user data
-rw-r--r--clients/nested.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/clients/nested.c b/clients/nested.c
index 856e64cb..eb4ddfdd 100644
--- a/clients/nested.c
+++ b/clients/nested.c
@@ -268,7 +268,6 @@ surface_attach(struct wl_client *client,
{
struct nested_surface *surface = wl_resource_get_user_data(resource);
struct nested *nested = surface->nested;
- void *buffer = wl_resource_get_user_data(buffer_resource);
EGLint format, width, height;
cairo_device_t *device;
@@ -276,7 +275,7 @@ surface_attach(struct wl_client *client,
wl_buffer_send_release(surface->buffer_resource);
surface->buffer_resource = buffer_resource;
- if (!query_buffer(nested->egl_display, buffer,
+ if (!query_buffer(nested->egl_display, buffer_resource,
EGL_TEXTURE_FORMAT, &format)) {
fprintf(stderr, "attaching non-egl wl_buffer\n");
return;
@@ -297,14 +296,15 @@ surface_attach(struct wl_client *client,
}
surface->image = create_image(nested->egl_display, NULL,
- EGL_WAYLAND_BUFFER_WL, buffer, NULL);
+ EGL_WAYLAND_BUFFER_WL, buffer_resource,
+ NULL);
if (surface->image == EGL_NO_IMAGE_KHR) {
fprintf(stderr, "failed to create img\n");
return;
}
- query_buffer(nested->egl_display, buffer, EGL_WIDTH, &width);
- query_buffer(nested->egl_display, buffer, EGL_HEIGHT, &height);
+ query_buffer(nested->egl_display, buffer_resource, EGL_WIDTH, &width);
+ query_buffer(nested->egl_display, buffer_resource, EGL_HEIGHT, &height);
device = display_get_cairo_device(nested->display);
surface->cairo_surface =