summaryrefslogtreecommitdiff
path: root/src/egl/main/eglclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/eglclient.c')
-rw-r--r--src/egl/main/eglclient.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/egl/main/eglclient.c b/src/egl/main/eglclient.c
new file mode 100644
index 0000000000..8426301948
--- /dev/null
+++ b/src/egl/main/eglclient.c
@@ -0,0 +1,21 @@
+/**
+ * Functions that client APIs can call.
+ */
+
+
+#include "eglcurrent.h"
+#include "egldisplay.h"
+#include "eglimage.h"
+#include "eglclient.h"
+
+
+/**
+ * Return the opaque client data of an image.
+ */
+void *
+_eglClientGetImageData(EGLImageKHR image)
+{
+ _EGLDisplay *dpy = _eglGetCurrentDisplay();
+ _EGLImage *img = _eglLookupImage(image, dpy);
+ return (img) ? img->ClientData : NULL;
+}