summaryrefslogtreecommitdiff
path: root/src/egl/main/eglimage.c
blob: 5044112fa8cb53abba464eabc7f355dc4986eafb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 */