EGL: add the native_fence_sync extension

This change adds support for the EGL_ANDROID_native_fence_sync extension to the
Android EGL layer.  It also fixes a couple minor issues with the extension spec.

Change-Id: Ic8829d21f37b701f33aa9c72c3d25e88e03fa3cd
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h
index 2d41aa7..7274854 100644
--- a/opengl/include/EGL/eglext.h
+++ b/opengl/include/EGL/eglext.h
@@ -270,6 +270,20 @@
 typedef EGLBoolean (EGLAPIENTRYP PFEGLAWAKENPROCESSIMGPROC)(void);
 #endif
 
+/* EGL_ANDROID_native_fence_sync
+ */
+#ifndef EGL_ANDROID_native_fence_sync
+#define EGL_ANDROID_native_fence_sync 1
+#define EGL_SYNC_NATIVE_FENCE_ANDROID                 0x3144
+#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID              0x3145
+#define EGL_NO_NATIVE_FENCE_FD_ANDROID                -1
+#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID        0x3146
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync);
+#endif
+typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROID) (EGLDisplay dpy, EGLSyncKHR sync);
+#endif
+
 #ifdef __cplusplus
 }
 #endif