Update egl/common.py
authorHengyuan Hu <hengyuan@google.com>
Fri, 12 Jun 2015 00:48:52 +0000 (17:48 -0700)
committerHengyuan Hu <hengyuan@google.com>
Fri, 12 Jun 2015 16:56:14 +0000 (09:56 -0700)
Add wrappers for EGL_EXT_buffer_age, EGL_KHR_partial_update and
EGL_KHR_swap_buffers_with_damage.

Change-Id: I5bdbd2f6d36c34aee244e191001d97adefd8d7f8

framework/egl/wrapper/eglwEnums.inl
framework/egl/wrapper/eglwFuncPtrLibraryDecl.inl
framework/egl/wrapper/eglwFuncPtrLibraryImpl.inl
framework/egl/wrapper/eglwFunctionTypes.inl
framework/egl/wrapper/eglwFunctions.inl
framework/egl/wrapper/eglwInitExtensions.inl
framework/egl/wrapper/eglwLibrary.inl
scripts/egl/common.py

index a9f811b..2e8a460 100644 (file)
 #define EGL_SYNC_CL_EVENT                                                                      0x30FE
 #define EGL_SYNC_CL_EVENT_COMPLETE                                                     0x30FF
 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT     0x3138
+#define EGL_BUFFER_AGE_KHR                                                                     0x313D
+#define EGL_BUFFER_AGE_EXT                                                                     0x313D
 #define EGL_NATIVE_BUFFER_ANDROID                                                      0x3140
 #define EGL_CONTEXT_OPENGL_DEBUG                                                       0x31B0
 #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE                          0x31B1
index 24dd7b8..b65985c 100644 (file)
@@ -49,9 +49,11 @@ const char *                                                         queryString                                             (EGLDisplay dpy, EGLint name) const;
 EGLBoolean                                                                     querySurface                                    (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) const;
 EGLBoolean                                                                     releaseTexImage                                 (EGLDisplay dpy, EGLSurface surface, EGLint buffer) const;
 EGLBoolean                                                                     releaseThread                                   (void) const;
+EGLBoolean                                                                     setDamageRegionKHR                              (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) const;
 EGLBoolean                                                                     signalSyncKHR                                   (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) const;
 EGLBoolean                                                                     surfaceAttrib                                   (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) const;
 EGLBoolean                                                                     swapBuffers                                             (EGLDisplay dpy, EGLSurface surface) const;
+EGLBoolean                                                                     swapBuffersWithDamageKHR                (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) const;
 EGLBoolean                                                                     swapInterval                                    (EGLDisplay dpy, EGLint interval) const;
 EGLBoolean                                                                     terminate                                               (EGLDisplay dpy) const;
 EGLBoolean                                                                     unlockSurfaceKHR                                (EGLDisplay dpy, EGLSurface surface) const;
index 0734bd7..007b950 100644 (file)
@@ -234,6 +234,11 @@ EGLBoolean FuncPtrLibrary::releaseThread (void) const
        return m_egl.releaseThread();
 }
 
+EGLBoolean FuncPtrLibrary::setDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) const
+{
+       return m_egl.setDamageRegionKHR(dpy, surface, rects, n_rects);
+}
+
 EGLBoolean FuncPtrLibrary::signalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) const
 {
        return m_egl.signalSyncKHR(dpy, sync, mode);
@@ -249,6 +254,11 @@ EGLBoolean FuncPtrLibrary::swapBuffers (EGLDisplay dpy, EGLSurface surface) cons
        return m_egl.swapBuffers(dpy, surface);
 }
 
+EGLBoolean FuncPtrLibrary::swapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) const
+{
+       return m_egl.swapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
+}
+
 EGLBoolean FuncPtrLibrary::swapInterval (EGLDisplay dpy, EGLint interval) const
 {
        return m_egl.swapInterval(dpy, interval);
index 9b2a87f..e02039a 100644 (file)
@@ -49,9 +49,11 @@ typedef EGLW_APICALL const char *                                                            (EGLW_APIENTRY* eglQueryStringFunc)
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglQuerySurfaceFunc)                                    (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglReleaseTexImageFunc)                                 (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglReleaseThreadFunc)                                   (void);
+typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglSetDamageRegionKHRFunc)                              (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglSignalSyncKHRFunc)                                   (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglSurfaceAttribFunc)                                   (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglSwapBuffersFunc)                                             (EGLDisplay dpy, EGLSurface surface);
+typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglSwapBuffersWithDamageKHRFunc)                (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglSwapIntervalFunc)                                    (EGLDisplay dpy, EGLint interval);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglTerminateFunc)                                               (EGLDisplay dpy);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglUnlockSurfaceKHRFunc)                                (EGLDisplay dpy, EGLSurface surface);
index 0d2621f..3ea39ba 100644 (file)
@@ -49,9 +49,11 @@ eglQueryStringFunc                                           queryString;
 eglQuerySurfaceFunc                                            querySurface;
 eglReleaseTexImageFunc                                 releaseTexImage;
 eglReleaseThreadFunc                                   releaseThread;
+eglSetDamageRegionKHRFunc                              setDamageRegionKHR;
 eglSignalSyncKHRFunc                                   signalSyncKHR;
 eglSurfaceAttribFunc                                   surfaceAttrib;
 eglSwapBuffersFunc                                             swapBuffers;
+eglSwapBuffersWithDamageKHRFunc                        swapBuffersWithDamageKHR;
 eglSwapIntervalFunc                                            swapInterval;
 eglTerminateFunc                                               terminate;
 eglUnlockSurfaceKHRFunc                                        unlockSurfaceKHR;
index b492874..9488633 100644 (file)
@@ -13,6 +13,8 @@ dst->destroySyncKHR                                   = (eglDestroySyncKHRFunc)                                       loader->get("eglDestroySyn
 dst->getPlatformDisplayEXT                     = (eglGetPlatformDisplayEXTFunc)                        loader->get("eglGetPlatformDisplayEXT");
 dst->getSyncAttribKHR                          = (eglGetSyncAttribKHRFunc)                                     loader->get("eglGetSyncAttribKHR");
 dst->lockSurfaceKHR                                    = (eglLockSurfaceKHRFunc)                                       loader->get("eglLockSurfaceKHR");
+dst->setDamageRegionKHR                                = (eglSetDamageRegionKHRFunc)                           loader->get("eglSetDamageRegionKHR");
 dst->signalSyncKHR                                     = (eglSignalSyncKHRFunc)                                        loader->get("eglSignalSyncKHR");
+dst->swapBuffersWithDamageKHR          = (eglSwapBuffersWithDamageKHRFunc)                     loader->get("eglSwapBuffersWithDamageKHR");
 dst->unlockSurfaceKHR                          = (eglUnlockSurfaceKHRFunc)                                     loader->get("eglUnlockSurfaceKHR");
 dst->waitSyncKHR                                       = (eglWaitSyncKHRFunc)                                          loader->get("eglWaitSyncKHR");
index eadfe2a..d46e459 100644 (file)
@@ -49,9 +49,11 @@ virtual const char *                                                         queryString                                             (EGLDisplay dpy, EGLint name) const
 virtual EGLBoolean                                                                     querySurface                                    (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) const                                                                             = 0;
 virtual EGLBoolean                                                                     releaseTexImage                                 (EGLDisplay dpy, EGLSurface surface, EGLint buffer) const                                                                                                               = 0;
 virtual EGLBoolean                                                                     releaseThread                                   (void) const                                                                                                                                                                                                    = 0;
+virtual EGLBoolean                                                                     setDamageRegionKHR                              (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) const                                                                               = 0;
 virtual EGLBoolean                                                                     signalSyncKHR                                   (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) const                                                                                                                   = 0;
 virtual EGLBoolean                                                                     surfaceAttrib                                   (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) const                                                                              = 0;
 virtual EGLBoolean                                                                     swapBuffers                                             (EGLDisplay dpy, EGLSurface surface) const                                                                                                                                              = 0;
+virtual EGLBoolean                                                                     swapBuffersWithDamageKHR                (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) const                                                                               = 0;
 virtual EGLBoolean                                                                     swapInterval                                    (EGLDisplay dpy, EGLint interval) const                                                                                                                                                 = 0;
 virtual EGLBoolean                                                                     terminate                                               (EGLDisplay dpy) const                                                                                                                                                                                  = 0;
 virtual EGLBoolean                                                                     unlockSurfaceKHR                                (EGLDisplay dpy, EGLSurface surface) const                                                                                                                                              = 0;
index 1105c4f..64690dd 100644 (file)
@@ -60,7 +60,10 @@ EXTENSIONS                   = [
        "EGL_EXT_platform_base",
        "EGL_EXT_platform_x11",
        "EGL_ANDROID_image_native_buffer",
-       "EGL_EXT_yuv_surface"
+       "EGL_EXT_yuv_surface",
+       "EGL_EXT_buffer_age",
+       "EGL_KHR_partial_update",
+       "EGL_KHR_swap_buffers_with_damage"
 ]
 PROTECTS                       = [
        "KHRONOS_SUPPORT_INT64"