aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglimage.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-08-15 22:58:13 +0800
committerChia-I Wu <[email protected]>2010-01-25 11:28:27 +0800
commita1c4a8a3c855d52fbfef10023b9a8f116e163a97 (patch)
tree4e5138454e78a3ec05d9adce04420f7c5047e427 /src/egl/main/eglimage.c
parent95f8f75ad8bdb1d8e1cc16ea91fed8c407c36abd (diff)
egl: Add support for EGL_KHR_image.
Individual drivers still need to implement the API hooks.
Diffstat (limited to 'src/egl/main/eglimage.c')
-rw-r--r--src/egl/main/eglimage.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
new file mode 100644
index 00000000000..5044112fa8c
--- /dev/null
+++ b/src/egl/main/eglimage.c
@@ -0,0 +1,51 @@
+#include <assert.h>
+
+#include "eglimage.h"
+#include "egldisplay.h"
+
+
+#ifdef EGL_KHR_image_base
+
+
+EGLBoolean
+_eglInitImage(_EGLDriver *drv, _EGLImage *img, const EGLint *attrib_list)
+{
+ EGLint i;
+
+ img->Preserved = EGL_FALSE;
+
+ for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) {
+ switch (attrib_list[i]) {
+ case EGL_IMAGE_PRESERVED_KHR:
+ i++;
+ img->Preserved = attrib_list[i];
+ break;
+ default:
+ /* not an error */
+ break;
+ }
+ }
+
+ return EGL_TRUE;
+}
+
+
+_EGLImage *
+_eglCreateImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx,
+ EGLenum target, EGLClientBuffer buffer,
+ const EGLint *attr_list)
+{
+ /* driver should override this function */
+ return NULL;
+}
+
+
+EGLBoolean
+_eglDestroyImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image)
+{
+ /* driver should override this function */
+ return EGL_FALSE;
+}
+
+
+#endif /* EGL_KHR_image_base */