summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2012-07-19 09:02:25 -0400
committerKristian Høgsberg <[email protected]>2012-07-19 14:03:17 -0400
commitd7522ed13052a3d30bc4faedce04685263f57933 (patch)
tree9244b66100be41f76dedc4b6a1ab55540ef204a8 /src/egl/drivers/dri2
parente23bfdb3298ec43ef895121527fb4d79474d7b1b (diff)
wayland: Support EGL_WIDTH and EGL_HEIGHT queries for wl_buffer
We're going to make the public wl_buffer struct as small as possible. Signed-off-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 8d82c19d72f..f86ed0bd5fc 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1414,9 +1414,16 @@ dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
return EGL_FALSE;
format = buffer->driver_format;
- if (attribute == EGL_TEXTURE_FORMAT) {
+ switch (attribute) {
+ case EGL_TEXTURE_FORMAT:
*value = format->components;
return EGL_TRUE;
+ case EGL_WIDTH:
+ *value = buffer->buffer.width;
+ break;
+ case EGL_HEIGHT:
+ *value = buffer->buffer.height;
+ break;
}
return EGL_FALSE;