From 166aeaa411ab61fffedb9dc94b258298589ff769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 25 Jun 2013 15:15:31 -0400 Subject: [PATCH] gl-renderer: Use eglQueryWaylandBufferWL for getting width and height This gets rid of the last remaining use of struct wl_buffer. --- src/gl-renderer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index f0ae3450..94ed5b53 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -1241,8 +1241,10 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer) (struct wl_buffer *)buffer->resource, EGL_TEXTURE_FORMAT, &format)) { buffer->legacy_buffer = (struct wl_buffer *)buffer->resource; - buffer->width = buffer->legacy_buffer->width; - buffer->height = buffer->legacy_buffer->height; + gr->query_buffer(gr->egl_display, buffer->legacy_buffer, + EGL_WIDTH, &buffer->width); + gr->query_buffer(gr->egl_display, buffer->legacy_buffer, + EGL_HEIGHT, &buffer->height); for (i = 0; i < gs->num_images; i++) gr->destroy_image(gr->egl_display, gs->images[i]);