[PATCH] wayland-egl: Add api to get window/pixmap attributes

Zhao, Halley halley.zhao at intel.com
Fri Feb 17 01:20:21 PST 2012


wl_egl_window/wl_egl_pixmap are implemented in mesa, however these drawables can also be update in video/camera modules.
One 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/wayland-egl.h |    6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/wayland-egl.h b/src/wayland-egl.h
index 56811a7..8ec5b2e 100644
--- a/src/wayland-egl.h
+++ b/src/wayland-egl.h
@@ -59,6 +59,12 @@ wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap);
struct wl_buffer *
wl_egl_pixmap_create_buffer(struct wl_egl_pixmap *egl_pixmap);
+void wl_egl_window_get_size(struct wl_egl_window *egl_window,
+                int *width, int *height);
+struct wl_surface* wl_egl_window_get_surface(struct wl_egl_window *win);
+void wl_egl_pixmap_get_size(struct wl_egl_pixmap *egl_pixmap,
+                int *width, int *height);
+
#ifdef  __cplusplus
}
#endif
--
1.7.5.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20120217/dbf73968/attachment.html>


More information about the wayland-devel mailing list