wl_egl_window/wl_egl_pixmap are implemented in mesa, however these drawables can also be update in video/camera modules. An example is that libva also manage buffer object for it, so the attributes of the drawable should be accessed outside of mesa. See Benjamin's work to enable libva for wayland: http://cgit.freedesktop.org/~bnf/libva/log/?h=wayland (I ported it to latest wayland api).
With this patch, we can remove the hack to copy wayland-egl-priv.h from mesa to libva. src/egl/wayland/wayland-egl/wayland-egl.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/egl/wayland/wayland-egl/wayland-egl.c b/src/egl/wayland/wayland-egl/wayland-egl.c index e950b4a..b7efab8 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl.c +++ b/src/egl/wayland/wayland-egl/wayland-egl.c @@ -81,3 +81,32 @@ wl_egl_pixmap_create_buffer(struct wl_egl_pixmap *egl_pixmap) { return egl_pixmap->buffer; } + +WL_EGL_EXPORT void +wl_egl_window_get_size(struct wl_egl_window *egl_window, + int *width, int *height) +{ + if (width) + *width = egl_window->width; + if (height) + *height = egl_window->height; +} + +WL_EGL_EXPORT struct wl_surface* +wl_egl_window_get_surface(struct wl_egl_window *win) +{ + if (win) + return win->surface; + else + return NULL; +} + +WL_EGL_EXPORT void +wl_egl_pixmap_get_size(struct wl_egl_pixmap *egl_pixmap, + int *width, int *height) +{ + if (width) + *width = egl_pixmap->width; + if (height) + *height = egl_pixmap->height; +} -- 1.7.5.4
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev