typedef EGLBoolean (*PostSubBufferNV_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, EGLint x, EGLint y, EGLint width, EGLint height);
+typedef EGLint (*QueryBufferAge_t)(_EGLDriver *drv,
+ _EGLDisplay *dpy, _EGLSurface *surface);
+
+
/**
* The API dispatcher jumps through these functions
*/
#endif
PostSubBufferNV_t PostSubBufferNV;
+
+ QueryBufferAge_t QueryBufferAge;
};
#endif /* EGLAPI_INCLUDED */
EGLBoolean NV_post_sub_buffer;
EGLBoolean EXT_create_context_robustness;
+ EGLBoolean EXT_buffer_age;
};
_EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
_EGL_CHECK_EXTENSION(EXT_create_context_robustness);
+ _EGL_CHECK_EXTENSION(EXT_buffer_age);
_EGL_CHECK_EXTENSION(NV_post_sub_buffer);
#undef _EGL_CHECK_EXTENSION
#include <stdlib.h>
#include <string.h>
#include "egldisplay.h"
+#include "egldriver.h"
#include "eglcontext.h"
#include "eglconfig.h"
#include "eglcurrent.h"
case EGL_POST_SUB_BUFFER_SUPPORTED_NV:
*value = surface->PostSubBufferSupportedNV;
break;
+ case EGL_BUFFER_AGE_EXT:
+ if (!dpy->Extensions.EXT_buffer_age) {
+ _eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
+ return EGL_FALSE;
+ }
+ *value = drv->API.QueryBufferAge(drv, dpy, surface);
+ break;
default:
_eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
return EGL_FALSE;