wayland: Add an extension to create wl_buffers from EGLImages
authorNeil Roberts <neil@linux.intel.com>
Mon, 28 Oct 2013 15:07:03 +0000 (15:07 +0000)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 5 Dec 2013 01:04:57 +0000 (17:04 -0800)
commit5cddb1ce3c9890435374ae3e03fc4a5b57dee314
tree97be439739da18c825b2941f846edb0709f280bd
parentbce64c6c83122b1f4a684cc7890c7a61d2f9ffd7
wayland: Add an extension to create wl_buffers from EGLImages

This adds an extension called EGL_WL_create_wayland_buffer_from_image
which adds the following single function:

struct wl_buffer *
eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);

The function creates a wl_buffer which shares its contents with the given
EGLImage. The expected use case for this is in a nested Wayland compositor
which is using subsurfaces to present buffers from its clients. Using this
extension it can attach the client buffers directly to the subsurface without
having to blit the contents into an intermediate buffer. The compositing can
then be done in the parent compositor.

The extension is only implemented in the Wayland EGL platform because of
course it wouldn't make sense anywhere else.
docs/specs/WL_create_wayland_buffer_from_image.spec [new file with mode: 0644]
include/EGL/eglmesaext.h
src/egl/drivers/dri2/platform_wayland.c
src/egl/main/eglapi.c
src/egl/main/eglapi.h
src/egl/main/egldisplay.h
src/egl/main/eglmisc.c