summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.h
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2013-10-28 15:07:03 +0000
committerKristian Høgsberg <[email protected]>2013-12-04 17:04:57 -0800
commit5cddb1ce3c9890435374ae3e03fc4a5b57dee314 (patch)
tree97be439739da18c825b2941f846edb0709f280bd /src/egl/main/eglapi.h
parentbce64c6c83122b1f4a684cc7890c7a61d2f9ffd7 (diff)
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.
Diffstat (limited to 'src/egl/main/eglapi.h')
-rw-r--r--src/egl/main/eglapi.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index 4a4f9765219..05803449a2e 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -126,6 +126,10 @@ typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *dis
typedef EGLBoolean (*QueryWaylandBufferWL_t)(_EGLDriver *drv, _EGLDisplay *displ, struct wl_resource *buffer, EGLint attribute, EGLint *value);
#endif
+#ifdef EGL_WL_create_wayland_buffer_from_image
+typedef struct wl_buffer * (*CreateWaylandBufferFromImageWL_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img);
+#endif
+
typedef EGLBoolean (*PostSubBufferNV_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, EGLint x, EGLint y, EGLint width, EGLint height);
typedef EGLint (*QueryBufferAge_t)(_EGLDriver *drv,
@@ -210,6 +214,10 @@ struct _egl_api
QueryWaylandBufferWL_t QueryWaylandBufferWL;
#endif
+#ifdef EGL_WL_create_wayland_buffer_from_image
+ CreateWaylandBufferFromImageWL_t CreateWaylandBufferFromImageWL;
+#endif
+
#ifdef EGL_EXT_swap_buffers_with_damage
SwapBuffersWithDamageEXT_t SwapBuffersWithDamageEXT;
#endif /* EGL_EXT_swap_buffers_with_damage */